Feature/Fix: Integrate lineage discovery and shadow accounting#2156
Feature/Fix: Integrate lineage discovery and shadow accounting#2156iam-brain wants to merge 11 commits into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed July 14, 2026, 8:23 PM ET / July 15, 2026, 00:23 UTC. Summary Reproducibility: yes. for the underlying fork-lineage overcount: the related investigation and frozen-corpus comparisons establish a high-confidence accounting failure. The runtime behavior and cost of this exact integration head have not been directly demonstrated. Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Maintainer decision needed
Security Review detailsBest possible solution: Keep legacy accounting authoritative, select one canonical identity/cache foundation, then land the lineage shadow path only after the stack is rebased and reconciled with competing work and this exact head demonstrates bounded cold, changed-input, warm, cancellation, and failure behavior. Do we have a high-confidence way to reproduce the issue? Yes for the underlying fork-lineage overcount: the related investigation and frozen-corpus comparisons establish a high-confidence accounting failure. The runtime behavior and cost of this exact integration head have not been directly demonstrated. Is this the best way to solve the issue? Unclear. The shadow-first design is conservative and well tested, but the four-layer architecture overlaps a narrower proof-positive repair and requires a maintainer decision about the permanent accounting boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c61e01e774c4. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (20 earlier review cycles; latest 8 shown)
|
03617a3 to
31cdb0e
Compare
31cdb0e to
b499c28
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d364597b2c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| try Self.recordCodexLineageShadow( | ||
| files: files, | ||
| roots: plan.roots, | ||
| cache: cache, | ||
| range: range, | ||
| checkCancellation: checkCancellation) |
There was a problem hiding this comment.
Avoid re-parsing cached Codex files in the shadow pass
When a Codex refresh runs after the min interval with an unchanged corpus, scanCodexFile can reuse cached per-file data, but this unconditional shadow call walks files and CodexLineageShadow.run parses every included JSONL again via CodexLineageDiscovery.discover/parseCodexLineageDocument. That reintroduces the scan-storm class covered by the performance gates for warm refreshes, and the cost scales with the entire in-window/cached corpus even though the shadow result is only logged; gate/sample it or derive it from cached rows so warm refreshes do not re-read all session files.
Useful? React with 👍 / 👎.
Stack dependency
This is PR 2 of 4. It follows PR #2155; review and merge that PR first.
Summary
Integrates bounded lineage discovery, token-accounting dimensions, and shadow execution with the existing scanner.
Validation
make checkRelated investigation: #2037.