fix(installer): ignore ritual runtime sentinels#1612
Conversation
Add selective .deft runtime sentinel gitignore entries to the installer and relocator while preserving tracked .deft/core payloads. Pin Go/Python projection parity and relocate regression coverage for the session ritual files.
|
| Filename | Overview |
|---|---|
| scripts/_triage_bootstrap_gitignore.py | Adds GITIGNORE_DEFT_RUNTIME_SENTINELS as the single source of truth for the two runtime sentinel paths; doc-fix removes the misleading .deft/ example from GITIGNORE_LINE's docstring. |
| scripts/relocate.py | Imports GITIGNORE_DEFT_RUNTIME_SENTINELS and spreads it into GITIGNORE_LINES before the eval entries; docstring updated accordingly. |
| cmd/deft-install/setup.go | Inserts .deft/ritual-state.json and .deft/last-session.json into canonicalGitignoreLines with a must-mirror comment; updates surrounding docblock and EnsureGitignoreLines comment. |
| cmd/deft-install/main_test.go | Adds three new tests (DoesNotIgnoreFrameworkPayload, RuntimeSentinelsMatchPythonSource, CreatesNew/AppendsToExisting coverage); refactors parsePythonEvalEntries into a shared parsePythonTupleEntries helper; parity filter tightened to prefix-only + no-slash + no-wildcard. |
| tests/relocate/test_self_bootstrap.py | Extends F2 constant-pins test, heal-blanket test, and idempotency test to assert presence of sentinel entries and absence of any blanket .deft/ line. |
| tests/relocate/test_state_matrix.py | Adds sentinel-presence and blanket-absence assertions to _assert_canonical_end_state, ensuring all state-matrix scenarios enforce the new gitignore contract. |
| scripts/ritual_sentinel.py | Comment-only update: replaces the stale ".deft/ is gitignored" assumption with the accurate "selectively gitignored" wording for both sentinel constants. |
| vbrief/completed/2026-06-13-1609-installer-ignore-deft-ritual-runtime-sentinels-in-consumer-p.vbrief.json | New completed vBRIEF for #1609; all four acceptance-criteria items carry "status": "completed" matching plan.status. |
| CHANGELOG.md | Adds concise [Unreleased] Fixed entry describing the selective gitignore fix and closing #1609. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
SOT["_triage_bootstrap_gitignore.py\nGITIGNORE_DEFT_RUNTIME_SENTINELS\n(.deft/ritual-state.json\n.deft/last-session.json)"]
SOT -->|"imported + spread (*)"| PYLINES["scripts/relocate.py\nGITIGNORE_LINES\n.deft-cache/ + sentinels + eval entries"]
SOT -->|"mirrored (parity test)"| GOLINES["cmd/deft-install/setup.go\ncanonicalGitignoreLines"]
PYLINES --> ENSURE_PY["_ensure_gitignore_lines()\ndeposit / heal consumer .gitignore"]
GOLINES --> ENSURE_GO["EnsureGitignoreLines()\ndeposit / heal consumer .gitignore"]
ENSURE_PY --> GI[".gitignore\n.deft/ritual-state.json ✓\n.deft/last-session.json ✓\n.deft/core/ — NOT ignored ✓"]
ENSURE_GO --> GI
PTEST["TestCanonicalGitignoreRuntimeSentinels\nMatchPythonSource\n(parity pin)"] -.->|"validates SOT == Go mirror"| SOT
PTEST -.-> GOLINES
Reviews (2): Last reviewed commit: "fix: address Greptile review findings" | Re-trigger Greptile
Addressed 0/0 P0 findings, 0/0 P1 findings, and 2/2 P2 findings from Greptile's review on PR deftai#1612. Verification: task check collected 7703 items / 9 deselected / 7694 selected; result 7688 passed, 5 skipped, 9 deselected, 1 xfailed. Focused checks also passed: go test ./cmd/deft-install, relocate pytest suite, vbrief_validate, and git diff --check.
Summary
.gitignorecoverage for.deft/ritual-state.jsonand.deft/last-session.jsonin the installer and relocator projections..deft/core/intentionally trackable so consumer repos do not hide the vendored framework payload.Related Issues
Closes #1609
Checklist
/deft:change <name>— N/A; this was an ingested bug scope with an active/completed vBRIEF.CHANGELOG.md— added entry under[Unreleased].ROADMAP.md— N/A; release-time roadmap movement only.Testing
PATH="$PWD/.venv/bin:$PATH" go test ./cmd/deft-install.venv/bin/python3 -m pytest tests/relocate/test_self_bootstrap.py tests/relocate/test_state_matrix.py -q.venv/bin/python3 -m pytest tests/cli/test_session_start.py tests/cli/test_verify_session_ritual.py -q.venv/bin/python3 scripts/vbrief_validate.py --vbrief-dir vbrief.venv/bin/python3 -m pytest tests/content/test_pyproject_version_freshness.py -qgit diff --checkPATH="$PWD/.venv/bin:$PATH" UV_NO_SYNC=1 task check— collected 7703 items / 9 deselected / 7694 selected; result: 7688 passed, 5 skipped, 9 deselected, 1 xfailed.Review Cycle
5b014b0reported 0 P0, 0 P1, and 2 P2 findings with confidence 4/5.65322deaddresses 2/2 P2 findings in one batch: tightened the runtime-sentinel parity filter and completed the vBRIEF acceptance-criteria items.gh pr view --commentsplusgh api repos/deftai/directive/pulls/1612/commentsas the two review sources.Post-Merge
gh issue view 1609 --json state --jq .state. If still open, close manually:gh issue close 1609 --comment "Closed by #<PR> (squash merge — auto-close did not trigger)"masterrequiring CI status check (one-time setup, see Add GitHub Actions CI workflow for linting and tests on PRs and pushes #57)