WIP: Add session repository orientation with validated SCIP fallback (depends on #361) #511

Draft
toasterson wants to merge 19 commits from claude/wi-019fa8eb-repo-state-manual-recovery into main
Owner

Adds a session-owned repository orientation with a deterministic repository/commit identity, graduated fidelity under a 2048 estimated-token budget, dirty-path diagnostics, file/crate blast radius, and existing ACP microtheory inspection/activation. The runtime path validates both cwd and Git root against the workspace executor boundary; session eviction releases the generation-owned view. Snapshot/WAL restoration keeps metadata inactive and unverified until a fresh authorized bind.

Work item: WI-264 (019fa8eb-2730-7242-a3f2-ba0387191f1e).

Dependency stack: this draft explicitly includes published, unmerged WI-263 PR #361 at 1a1adda337adbb267c32035415f9e42a236efd2d, integrated with main f826e163bc961e09f2bb72cfa0122cb0d7bd03dd in prerequisite merge 1dcb7aa. The live WI-263 hard dependency remains pending. Own source starts after that merge; current reviewed head is dcbeb682.

This is a partial implementation. The production reader acceptance requirement remains open:

  • The current source is a read-only validated SCIP artifact fallback. The repository exposes no live codex_kg reader yet; this draft does not create a replacement structural store or any codex_kg write path.
    Incremental derived-view refresh now retains runtime-only per-document summaries keyed by freshly validated source, occurrence, referenced-definition and package identities. Unchanged summaries reuse their existing allocation; moving or deleting a definition refreshes unchanged callers and removes obsolete edges. Aggregate transitive closure observes the refreshed graph. Full artifact integrity and compiler binding validation still runs before reuse; this is not incremental compiler indexing. The reuse cache cannot deserialize from snapshots/WAL.

Only exact repo/commit, source-byte-verified, unambiguous SCIP evidence authorizes Rust dependency summaries. Missing, dirty, stale, incomplete, ambiguous, oversized or corrupt evidence degrades explicitly. The temporary ResolutionStore is discarded after projecting handles/summaries. Code structure never enters belief triples. Restored completeness cannot authorize live resolution.

Validation of reviewed source dcbeb682260a9f36930c0dc5ef405563a2c7b90e:

  • Eight repository-view tests and two actual ACP attach/inspect/cleanup tests passed, including strict stale restore/WAL handling, whole-render budgets, producer/source corruption, commit changes, lease generations and executor containment. The new multi-commit regression proves unchanged-caller retargeting, target deletion, independent allocation reuse, stale producer refusal and cache non-persistence.
  • The explicitly run historical reader replay passed against exact WI-263 producer commit d4d46b598f8c9b7597b4222f2ed2903a20ccabfa. The original 93,929,352-byte index hash was verified. The reader returned 1,179 Rust/manifest handles, complete=false, and the actual reason ambiguous SCIP definitions or references; no complete blast radius, with zero authorized file/crate edges. The final-head replay took 3.61 seconds of test time. This is historical reader evidence, not production freshness or full acceptance.
  • Server library/akhomed compatibility, ordinary matching Clippy and feature-disabled library compatibility all passed. Clippy completed with warnings. No source changed after validation.

Independent source review approved this explicitly partial boundary. No hold/dependency/gate override, completion, merge or deployment is claimed.

Adds a session-owned repository orientation with a deterministic repository/commit identity, graduated fidelity under a 2048 estimated-token budget, dirty-path diagnostics, file/crate blast radius, and existing ACP microtheory inspection/activation. The runtime path validates both cwd and Git root against the workspace executor boundary; session eviction releases the generation-owned view. Snapshot/WAL restoration keeps metadata inactive and unverified until a fresh authorized bind. Work item: WI-264 (`019fa8eb-2730-7242-a3f2-ba0387191f1e`). Dependency stack: this draft explicitly includes published, unmerged WI-263 PR #361 at `1a1adda337adbb267c32035415f9e42a236efd2d`, integrated with main `f826e163bc961e09f2bb72cfa0122cb0d7bd03dd` in prerequisite merge `1dcb7aa`. The live WI-263 hard dependency remains pending. Own source starts after that merge; current reviewed head is `dcbeb682`. This is a partial implementation. The production reader acceptance requirement remains open: - The current source is a read-only validated SCIP artifact fallback. The repository exposes no live `codex_kg` reader yet; this draft does not create a replacement structural store or any codex_kg write path. Incremental derived-view refresh now retains runtime-only per-document summaries keyed by freshly validated source, occurrence, referenced-definition and package identities. Unchanged summaries reuse their existing allocation; moving or deleting a definition refreshes unchanged callers and removes obsolete edges. Aggregate transitive closure observes the refreshed graph. Full artifact integrity and compiler binding validation still runs before reuse; this is not incremental compiler indexing. The reuse cache cannot deserialize from snapshots/WAL. Only exact repo/commit, source-byte-verified, unambiguous SCIP evidence authorizes Rust dependency summaries. Missing, dirty, stale, incomplete, ambiguous, oversized or corrupt evidence degrades explicitly. The temporary ResolutionStore is discarded after projecting handles/summaries. Code structure never enters belief triples. Restored completeness cannot authorize live resolution. Validation of reviewed source `dcbeb682260a9f36930c0dc5ef405563a2c7b90e`: - Eight repository-view tests and two actual ACP attach/inspect/cleanup tests passed, including strict stale restore/WAL handling, whole-render budgets, producer/source corruption, commit changes, lease generations and executor containment. The new multi-commit regression proves unchanged-caller retargeting, target deletion, independent allocation reuse, stale producer refusal and cache non-persistence. - The explicitly run historical reader replay passed against exact WI-263 producer commit `d4d46b598f8c9b7597b4222f2ed2903a20ccabfa`. The original 93,929,352-byte index hash was verified. The reader returned 1,179 Rust/manifest handles, `complete=false`, and the actual reason `ambiguous SCIP definitions or references; no complete blast radius`, with zero authorized file/crate edges. The final-head replay took 3.61 seconds of test time. This is historical reader evidence, not production freshness or full acceptance. - Server library/akhomed compatibility, ordinary matching Clippy and feature-disabled library compatibility all passed. Clippy completed with warnings. No source changed after validation. Independent source review approved this explicitly partial boundary. No hold/dependency/gate override, completion, merge or deployment is claimed.
WI 2 — SCIP precision tier + the resolution accuracy harness that gates everything downstream
All checks were successful
CI / check-seshat (pull_request) Successful in 8m35s
CI / check-akh-medu (pull_request) Successful in 13m18s
CI / publish-chart (pull_request) Successful in 1m39s
CI / docker-seshd (pull_request) Successful in 9m7s
CI / test-akh-medu (pull_request) Successful in 18m18s
c88dd9b526
Anima implementation session.
feat(shend): add SCIP precision harness tier
All checks were successful
CI / check-akh-medu (pull_request) Successful in 7m18s
CI / test-session-platform (pull_request) Successful in 15m26s
CI / docker-seshd (pull_request) Successful in 8m7s
CI / test-akh-medu (pull_request) Successful in 10m40s
CI / check-seshat (pull_request) Successful in 14m47s
CI / publish-chart (pull_request) Successful in 5m47s
CI / test-sokar (pull_request) Successful in 18m51s
CI / docker-akh-transcripts (pull_request) Successful in 6m33s
CI / docker-sokard (pull_request) Successful in 14m9s
6430b6c944
fix(shend): build lexical scopes once per syntax node
All checks were successful
CI / check-seshat (pull_request) Successful in 6m12s
CI / test-akh-medu (pull_request) Successful in 6m41s
CI / check-akh-medu (pull_request) Successful in 8m11s
CI / docker-akh-transcripts (pull_request) Successful in 6m14s
CI / test-sokar (pull_request) Successful in 21m6s
CI / publish-chart (pull_request) Successful in 9m9s
CI / docker-sokard (pull_request) Successful in 14m18s
CI / docker-seshd (pull_request) Successful in 15m11s
CI / test-session-platform (pull_request) Successful in 27m11s
7ecad5b406
Measure real Akh-Medu SCIP accuracy and preserve truthful coverage
Some checks failed
SCIP accuracy / produce-index (pull_request) Has been skipped
CI / test-sokar (pull_request) Successful in 11m40s
CI / check-akh-medu (pull_request) Successful in 15m7s
CI / check-seshat (pull_request) Successful in 31m37s
CI / docker-sokard (pull_request) Successful in 45m40s
CI / publish-chart (pull_request) Successful in 45m35s
CI / docker-seshd (pull_request) Successful in 56m24s
CI / docker-akh-transcripts (pull_request) Successful in 58m37s
SCIP accuracy / recorded-accuracy (pull_request) Failing after 56m0s
CI / test-akh-medu (pull_request) Failing after 2h11m15s
CI / test-session-platform (pull_request) Successful in 2h32m55s
CI / platform-images-daemons (pull_request) Has been skipped
CI / platform-images-core (pull_request) Has been skipped
CI / platform-images-home (pull_request) Has been skipped
CI / platform-images-fleet (pull_request) Has been skipped
CI / platform-images-collect (pull_request) Has been skipped
1a1adda337
Add explicit historical SCIP reader replay fixture entry point
Some checks failed
SCIP accuracy / produce-index (pull_request) Has been skipped
CI / test-session-platform (pull_request) Has been cancelled
CI / test-sokar (pull_request) Has been cancelled
CI / check-seshat (pull_request) Has been cancelled
CI / check-akh-medu (pull_request) Has been cancelled
CI / test-akh-medu (pull_request) Has been cancelled
CI / docker-seshd (pull_request) Has been cancelled
CI / docker-sokard (pull_request) Has been cancelled
CI / docker-akh-transcripts (pull_request) Has been cancelled
CI / publish-chart (pull_request) Has been cancelled
CI / platform-images-home (pull_request) Has been cancelled
CI / platform-images-core (pull_request) Has been cancelled
CI / platform-images-daemons (pull_request) Has been cancelled
CI / platform-images-fleet (pull_request) Has been cancelled
CI / platform-images-collect (pull_request) Has been cancelled
SCIP accuracy / recorded-accuracy (pull_request) Has been cancelled
90673f5ecd
Refresh only changed repository document summaries after evidence validation
Some checks failed
SCIP accuracy / produce-index (pull_request) Has been skipped
CI / test-sokar (pull_request) Failing after 31m4s
CI / docker-akh-transcripts (pull_request) Successful in 12m34s
CI / docker-seshd (pull_request) Successful in 23m51s
CI / check-akh-medu (pull_request) Successful in 34m13s
CI / docker-sokard (pull_request) Successful in 27m36s
CI / check-seshat (pull_request) Successful in 45m29s
CI / publish-chart (pull_request) Successful in 33m16s
CI / test-akh-medu (pull_request) Successful in 58m43s
SCIP accuracy / recorded-accuracy (pull_request) Successful in 1h25m33s
CI / test-session-platform (pull_request) Successful in 2h25m26s
CI / platform-images-home (pull_request) Has been skipped
CI / platform-images-core (pull_request) Has been skipped
CI / platform-images-daemons (pull_request) Has been skipped
CI / platform-images-fleet (pull_request) Has been skipped
CI / platform-images-collect (pull_request) Has been skipped
dcbeb68226
Some checks failed
SCIP accuracy / produce-index (pull_request) Has been skipped
CI / test-sokar (pull_request) Failing after 31m4s
CI / docker-akh-transcripts (pull_request) Successful in 12m34s
CI / docker-seshd (pull_request) Successful in 23m51s
CI / check-akh-medu (pull_request) Successful in 34m13s
CI / docker-sokard (pull_request) Successful in 27m36s
CI / check-seshat (pull_request) Successful in 45m29s
CI / publish-chart (pull_request) Successful in 33m16s
CI / test-akh-medu (pull_request) Successful in 58m43s
SCIP accuracy / recorded-accuracy (pull_request) Successful in 1h25m33s
CI / test-session-platform (pull_request) Successful in 2h25m26s
CI / platform-images-home (pull_request) Has been skipped
CI / platform-images-core (pull_request) Has been skipped
CI / platform-images-daemons (pull_request) Has been skipped
CI / platform-images-fleet (pull_request) Has been skipped
CI / platform-images-collect (pull_request) Has been skipped
This pull request has changes conflicting with the target branch.
  • Cargo.lock
  • Cargo.toml
  • docs/ai/plans/2026-10-01-lilith-c5-c7-dojo-and-training.md
  • scripts/lilith/dojo/README.md
  • scripts/lilith/dojo/baseline.py
  • scripts/lilith/dojo/contracts.py
  • scripts/lilith/dojo/dojo_report.py
  • scripts/lilith/dojo/episode.py
  • scripts/lilith/dojo/families.py
  • scripts/lilith/dojo/memory_epistemics.py
  • scripts/lilith/dojo/replay_anima.py
  • scripts/lilith/dojo/replay_server.py
  • scripts/lilith/dojo/reverify.py
  • scripts/lilith/dojo/runner.py
  • scripts/lilith/dojo/snapshot.py
  • scripts/lilith/dojo/tests/test_memory_epistemics.py
  • src/acp/mod.rs
  • src/engine.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin claude/wi-019fa8eb-repo-state-manual-recovery:claude/wi-019fa8eb-repo-state-manual-recovery
git switch claude/wi-019fa8eb-repo-state-manual-recovery

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff claude/wi-019fa8eb-repo-state-manual-recovery
git switch claude/wi-019fa8eb-repo-state-manual-recovery
git rebase main
git switch main
git merge --ff-only claude/wi-019fa8eb-repo-state-manual-recovery
git switch claude/wi-019fa8eb-repo-state-manual-recovery
git rebase main
git switch main
git merge --no-ff claude/wi-019fa8eb-repo-state-manual-recovery
git switch main
git merge --squash claude/wi-019fa8eb-repo-state-manual-recovery
git switch main
git merge --ff-only claude/wi-019fa8eb-repo-state-manual-recovery
git switch main
git merge claude/wi-019fa8eb-repo-state-manual-recovery
git push origin main
Sign in to join this conversation.
No reviewers
No labels
follow-up
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
toasterson/akh-medu!511
No description provided.