-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Core hardening tracker: converge duplicated runtime invariants onto single owners #104219
Copy link
Copy link
Closed
Closed
Copy link
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.enhancementNew feature or requestNew feature or requestimpact:auth-providerAuth, provider routing, model choice, or SecretRef resolution may break.Auth, provider routing, model choice, or SecretRef resolution may break.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.maintainerMaintainer-authored PRMaintainer-authored PRmaturity:stableIssue affects a taxonomy feature currently scored M4/M5.Issue affects a taxonomy feature currently scored M4/M5.
Type
Fields
Priority
None yet
Summary
Tracker for a bounded core-hardening effort: replace competing implementations of the same runtime invariant with one canonical owner and one execution path. Started from an AI-assisted architecture comparison (cross-checked against OpenAI Codex CLI's structure), verified per seam with file-level evidence before each change.
Outcome: complete. Seven PRs merged. A mid-effort re-verification (2026-07-12, fresh code reading of every remaining row against current
main) falsified or downgraded most of the remaining claims — those rows were dropped rather than built.Change shape (per seam)
Results
agent-wait-dedupe.tsdeletedtranscriptsomitted,canvasmisclassified)agent-run-terminal-outcome.tsdetectErrorKinddeleted from core (kept as deprecated plugin-SDK compat). Remaining "duplicate classifiers" turned out to answer different questions with deliberate policies — droppedbash/execdrift causes zero wrong behavior (alias normalization or dual-listing neutralizes it in all four lists; pinned by an existing test)attempt.tsfinalization epilogueget-reply-run.ts) moved to accessor per-entry APIs. Remaining debt is owned by thesession-accessor-debt-baselineratchetmaxSpawnDepthchange, but the spawn gate independently checks raw depth, so it is non-exploitable; the depth fallback is required for legacy recordsGatewaySessionRowis an intentional view-model projection, not a drifting mirror; the files co-evolve correctlyCORE_BUILT_IN_MODEL_APISsingle-sourced; fail-closed 72-case manifest↔runtime auth-literal parity test (drift here = silent auth failure); terminal catch honors structuredFailoverErrorreasons (context_overflow,timeout/server_error), accepted via maintainer proof override — live paths proven regression-free, tokenless case unit-pinnedTakeaway
Duplication tracks shape openness, not codebase size: where an owner exports a closed type, downstream layers delegate; where it exports open shapes — boolean flags, freeform strings, name lists — shadow reimplementations accrete above it. Convergence only sticks when the PR both exports the closed type and deletes the superseded path in the same change. The second lesson is from the re-verification: half the plausible-looking seams dissolved under fresh code reading — "two code sites computing the same-looking thing" is often two deliberate policies answering different questions, and unifying them is a regression dressed as cleanup. Verify drift consequences, not drift appearance, before building.
Remaining follow-ups (own decisions, not this tracker)
plugin-sdk/session-store-runtime.tsand thelibrary.tsroot exports still publishloadSessionStore/updateSessionStoreas shipped API — retiring them is a compatibility-sensitive SDK decision.attempt.tsterminal epilogue) if terminal-ordering bugs recur there.