- K27 receipt presentation: full decision+evidence+effect packages, expandable sections, UNKNOWN-never-success in every dimension state, spine verdicts via evidence.Evaluate (read-only import) - 2.6-depth compaction: append-per-message (O(1) tail line, 198 bytes steady-state), compaction every 64 appends (512/channel hot), cool archives per memory-continuity contract, nothing deleted, exact-by-ID across compaction+restart+tamper, legacy checkpoints heal on load - K27 composer depth: 3-line input per old TUI contracts (§2.3 history walk, placeholder, stash/restore), deterministic natural-language resolution (40+ pinned phrases), palette natural-tier + ctrl+p bind, Accessibility profile (keyboard-only/no-color/reduced-motion) - K27 themes: 10 fixed Go theme tables (byte-exact from Textual 8.2.8, not guessed; nord/dracula-default/monokai/solarized/catppuccin/tokyo- night/flexoki/gruvbox), /theme command (mirrors _cmd_theme exactly), live-editor data shape (staged per-token preview overrides), base bg rgb(30,30,40), no-drift drift test anchoring Go to retiring Python - Sleight live wiring: operator._context_broker registers seventh contributor 'continuity' (bucket 2, fail-closed); K16 allowlist amended (memory_continuity.working_set); matrices now run against the live road; 102 tests green - .gitignore hygiene: directory-level traps fixed (internal/ re-includes .go/.json/.md only; root-anchored /index/ /journal/ /state/; fixtures + testdata re-included at any depth); 6-test frozen gate; unified_check member wired; real git add (no -f) proven on testmod/internal - Receipts, compaction, composer, themes, sleight-wiring, hygiene all under ADMIT contracts (101+ contracts, 0 research-gate violations) - main.go NOT landed (chat-live P1 wave owns it, still in flight)
136 lines
5.8 KiB
Python
136 lines
5.8 KiB
Python
"""Admission dispatch for the wave-gitignore-hygiene mechanical repair
|
|
(owner dispatch, checkpoint open note ".gitignore:21 hygiene + 102MB cache
|
|
sweep race (structural fix needed)").
|
|
|
|
classify + activate + admit (the headless scaffolding entry law,
|
|
tests/test_construction_admission.py pattern): mechanical gitignore
|
|
hygiene — the src/go artifact rule (src/go/*/[^.]*) that once swallowed
|
|
module dirs + their internal/ sources (modegate binary fabrication, K9
|
|
sweep accident, 102MB cache re-lands all trace to the force-add era) gets
|
|
finishing rules: sources-only re-includes under subpackage dirs (.go/
|
|
.json/.md — binaries stay ignored), fixture/testdata stores re-included
|
|
at any depth, the cwd-local runtime dir rules (index/ journal/ state/)
|
|
anchored to the repo root (they currently swallow the tracked source
|
|
dirs memory/index/ + memory/journal/ — new files there are silently
|
|
unaddable), duplicate store/scaffold/current.json entry deduped, and the
|
|
intent documented in comments. Frozen battery tests/test_gitignore_hygiene.py
|
|
+ gate scripts/check_gitignore_hygiene.py wired as unified_check member
|
|
gitignore_hygiene (red-first: the battery ran RED against the pre-fix
|
|
.gitignore before the fix landed).
|
|
|
|
Research exemption: owner-directive mechanical repair (hygiene), declared
|
|
in docs/factory/research-registry.json slug gitignore-hygiene.
|
|
"""
|
|
import json
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "src"))
|
|
|
|
from rune import construction_activation as cact # noqa: E402
|
|
from rune import construction_admission as cadm # noqa: E402
|
|
from rune import construction_mode as cmode # noqa: E402
|
|
from rune import scaffold as sc # noqa: E402
|
|
|
|
ROOT = os.path.join(os.path.dirname(__file__), "..")
|
|
|
|
OBJECTIVE = (
|
|
"gitignore hygiene repair (wave-gitignore-hygiene): rebuild the src/go "
|
|
"artifact rules in .gitignore so source files under subpackage dirs "
|
|
"(internal/, cmd/, ...) are addable without -f while binaries stay "
|
|
"ignored — module dirs re-included for traversal, module-level sources "
|
|
"by extension (.go/.json/.mod/.sum), subpackage contents ignored by "
|
|
"default with explicit .go/.json/.md re-includes (no binary intent "
|
|
"preserved), fixtures/ and testdata/ committed fixture stores "
|
|
"re-included at any depth; anchor the cwd-local runtime dir rules "
|
|
"(index/ journal/ state/) to the repo root so they stop swallowing the "
|
|
"tracked source dirs memory/index/ and memory/journal/; dedupe the "
|
|
"store/scaffold/current.json entry; document every rule's intent in "
|
|
".gitignore comments; add frozen battery tests/test_gitignore_hygiene.py "
|
|
"+ gate scripts/check_gitignore_hygiene.py wired as unified_check "
|
|
"member gitignore_hygiene (red-first: battery proven RED on the "
|
|
"pre-fix rules, then GREEN on the fixed rules)"
|
|
)
|
|
AFFECTED = [
|
|
".gitignore",
|
|
"scripts/check_gitignore_hygiene.py",
|
|
"tests/test_gitignore_hygiene.py",
|
|
"scripts/unified_check.py",
|
|
"docs/factory/research-registry.json",
|
|
"scripts/admit_wave_gitignore_hygiene.py",
|
|
]
|
|
|
|
def main() -> int:
|
|
store = os.path.join(ROOT, "store", "scaffold")
|
|
scaffold = sc.Scaffold(store, "rune")
|
|
|
|
md = cmode.classify_mode(
|
|
OBJECTIVE,
|
|
target_project="rune",
|
|
project_exists=True,
|
|
affected_surface=AFFECTED,
|
|
)
|
|
print("classified mode:", md.mode)
|
|
|
|
need = {
|
|
"need_id": "need-wave-gitignore-hygiene",
|
|
"objective": OBJECTIVE,
|
|
"origin": "worker",
|
|
"project": "rune",
|
|
"task_ref": "wave-gitignore-hygiene",
|
|
"affected_surface": AFFECTED,
|
|
"evidence_refs": [
|
|
".gitignore",
|
|
"docs/factory/spawn-queue.md",
|
|
"memory/journal/events.jsonl",
|
|
"memory/index/capability_cards.json",
|
|
],
|
|
"exemption": (
|
|
"owner-directive: mechanical hygiene repair (gitignore rules + "
|
|
"frozen gate), per owner dispatch (see "
|
|
"docs/factory/research-registry.json slug gitignore-hygiene)"),
|
|
}
|
|
act = cact.activate(md, need=need, scaffold=scaffold,
|
|
builder="wave-gitignore-hygiene")
|
|
print("activated:", act.get("activated"), act.get("mode"))
|
|
|
|
env = cadm.admit(
|
|
act,
|
|
objective=OBJECTIVE,
|
|
builder="wave-gitignore-hygiene",
|
|
affected_surface=AFFECTED,
|
|
evidence_refs=need["evidence_refs"],
|
|
origin="worker",
|
|
task_ref="wave-gitignore-hygiene",
|
|
expected_new_entities=[
|
|
"scripts/check_gitignore_hygiene.py (gitignore hygiene gate)",
|
|
"tests/test_gitignore_hygiene.py (frozen battery, red-first)",
|
|
"unified_check member gitignore_hygiene",
|
|
".gitignore rebuilt rules + intent comments",
|
|
],
|
|
expected_runtime_effects=[
|
|
"unified_check gains declared member gitignore_hygiene: RED when "
|
|
"a probe source file under src/go/testmod/internal/ is ignored "
|
|
"(or unaddable without -f), when a probe binary under src/go/ "
|
|
"is addable, or when new files under memory/index/ or "
|
|
"memory/journal/ are swallowed by the runtime-artifact rules; "
|
|
"GREEN otherwise",
|
|
],
|
|
verification_obligations=[
|
|
"RUNE_CA_CORE=python RUNE_CM_CORE=python PYTHONPATH=src "
|
|
"python -m pytest tests/test_gitignore_hygiene.py green",
|
|
"python scripts/check_gitignore_hygiene.py exits 0 "
|
|
"VERDICT: GREEN",
|
|
"unified_check --members gitignore_hygiene member line GREEN",
|
|
],
|
|
approval_ref="user:wave-gitignore-hygiene dispatch",
|
|
contract_id="ADMIT-wave-gitignore-hygiene",
|
|
project_store=store,
|
|
project_id="rune",
|
|
)
|
|
print(json.dumps(env, indent=2, default=str)[:2400])
|
|
return 0 if env.get("success") else 1
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|