Skip to content

[codex] 0.18: decontaminate packet planning and repair the substrate - #2103

Merged
TheGreenCedar merged 59 commits into
dev/codestory-nextfrom
codex/2099-v018-decontamination-r3
Sep 2, 2026
Merged

[codex] 0.18: decontaminate packet planning and repair the substrate#2103
TheGreenCedar merged 59 commits into
dev/codestory-nextfrom
codex/2099-v018-decontamination-r3

Conversation

@TheGreenCedar

@TheGreenCedar TheGreenCedar commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Outcome

Horizon A removes benchmark-shaped packet policy and repairs the trusted substrate without claiming that CodeStory 0.18 is useful or releasable yet.

The packet path now forwards ordinary wording unchanged to generic retrieval, admits at most sixteen stable identities from descriptor metadata before candidate hydration, exact-hydrates only those identities, and reports bounded source-backed evidence with answer_sufficiency: not_asserted. Repository-derived packet compilation is deliberately absent from this PR and remains owned by #2106.

Closes #2105
Refs #2098
Refs #2099
Refs #2104
Refs #2106

Base: a41e605ea01e9e2c8b400eb5ee5456efd05f060e

What changed

Packet decontamination and bounded admission

  • Removed task-class steering, prompt taxonomies, answer-shape obligations, synthesized claims, evidence carriers/roles, benchmark-family deletion passes, and basename-only identity authority.
  • Kept one prompt-blind interim route: the unchanged question and caller-supplied typed free queries enter generic retrieval. Typed exact probes constrain identity resolution only.
  • Added descriptor-only packet admission using stable identity, path, versioned retrieval score, and a conservative source bound.
  • Shared one packet-wide session across exact probes, initial retrieval, subqueries, and continuations. It admits exact typed selectors first, then retrieval descriptors, and stops at sixteen identities or 16 KiB of reserved source.
  • Deferred all candidate source, graph-neighbourhood, node-body, and file-record hydration until after admission. Missing identities or source bounds fail closed.
  • Replaced prompt-derived continuation text with stable typed selectors and objective count, byte, source, or ambiguity reasons.
  • Enforced the complete public 16-row / 16-KiB response limit with a typed budget fallback. Public output never asserts answer sufficiency.

Publication, retrieval, and storage

  • Added immutable core generations and pinned CoreReadSession reads.
  • Made CorePublishTransaction return ordinary failure only before pointer replacement; post-replacement durability uncertainty is a committed result.
  • Repaired incremental copy-forward and semantic-contract publication on immutable generations.
  • Added bounded lexical deltas, reconciled incremental timing, observational cache inventory, and compact rehydrate through the generation pointer.

Explicit verification and installed timing

  • Kept verify_indexed_direct_calls as a separately invoked advanced surface with automatic routing disabled.
  • Moved call-path grammar, validation, proof projection, and shared result ownership into runtime/contracts; CLI and MCP remain adapters.
  • Kept compact proof output at 4 KiB, fail closed on full output, and report provenance unavailable until Serve real proof provenance artifacts behind a capability registry #2104.
  • Added cold core-only preparation with retry_same_request, read-only tool annotations, and proof-enabled November 2024 transport coverage.
  • Replaced timing aliases with literal InstalledAgentTimingV1 intervals. Reused comparator rows remain timing-ineligible.

How to review

Start with:

  • crates/codestory-contracts/src/compilation.rs
  • crates/codestory-retrieval/src/candidate.rs and query.rs
  • crates/codestory-runtime/src/agent/packet_candidate.rs
  • crates/codestory-runtime/src/agent/retrieval_primary.rs
  • crates/codestory-runtime/src/agent/orchestrator.rs
  • crates/codestory-runtime/src/agent/packet_compiler.rs
  • crates/codestory-store/src/core_session.rs
  • crates/codestory-contracts/src/call_path_public.rs
  • scripts/lib/packet-generalization-boundary.mjs
  • docs/architecture/packet-generalization.md

The critical boundary is:

question + typed probes
  -> unchanged generic query plan
  -> descriptor-only retrieval
  -> packet-wide admission
  -> admitted candidate hydration
  -> bounded interim evidence projection

No step after generic retrieval may inspect prompt terms or assign answer roles.

Verification

Focused source checks completed on exact head
62bc6f3f8d1d7291c6258f2639efc912cfe06bba:

  • cargo clippy --workspace --lib --locked -- -D warnings — passed
  • cargo test --locked -p codestory-contracts --lib — 123 passed
  • cargo test --locked -p codestory-agent --lib --tests — 76 passed
  • cargo test --locked -p codestory-retrieval --lib — 403 passed, 3 ignored
  • cargo test --locked -p codestory-runtime --lib — 824 passed, 4 ignored
  • cargo test --locked -p codestory-store --lib — 282 passed
  • cargo test --locked -p codestory-cli --lib — 456 passed, 1 ignored
  • cargo test --locked -p codestory-cli --features proof-qualification-support --lib — 462 passed, 1 ignored
  • cargo test --locked -p codestory-cli --test architecture_contracts — 56 passed
  • cargo test --locked -p codestory-cli --features proof-qualification-support --test architecture_contracts — 57 passed
  • cargo test --locked -p codestory-cli --test stdio_protocol_contracts — 66 passed
  • cargo test --locked -p codestory-cli --test cli_golden_path — 18 passed
  • packet generalization boundary — 32 tests passed; live scan passed across 102 production packet files
  • routing conformance and qualification contracts — 41 tests passed
  • installed A/B analyzer and timing contracts — 189 tests passed
  • plugin static and skill syntax — passed in required exact-head CI
  • documentation links — 86 files and 318 links passed
  • workflow policy, cargo fmt --all -- --check, and git diff --check — passed

Independent adversarial review accepted exact head
62bc6f3f8d1d7291c6258f2639efc912cfe06bba against the named Horizon A
boundary matrix, and every required PR check passed. Broad source
stabilization, performance qualification, and product acceptance deliberately
do not run on this support PR.

Non-claims

  • No evidence compiler or product-usefulness claim.
  • No 0.18.0 version bump, calibration, source stabilization, qualification, promotion, tag, or release.
  • No unseen accuracy claim from the historical 18-task, Dart, Q2, or 45/54 results.
  • No Redis p50/p95, installed ABBA, sealed product acceptance, or packaging claim.
  • No automatic verifier routing or new proof domain.

Those gates remain in #2106 and the 0.18 qualification plan. The published comparator remains 0.17.5.

TheGreenCedar and others added 14 commits August 31, 2026 08:20
Land the anti-contamination checker, docs, CI wiring, and failing
black-box agent tests before planner deletion on the decontamination lane.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce Stage B graph planning with frozen initial limits and
unit coverage for empty, connected, and vocabulary-only inputs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Delete domain flow classifiers, cleanup passes, and flow-template claim
surfaces; keep generic seeds and Stage B repository evidence planning, and
flip the generalization boundary gate to expect a clean head.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prove Stage B planning stays stable under rename, paraphrase, wrapper
depth, multi-impl, distractors, truncated graphs, and six language paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
Lock Stage B constants after the visible metamorphic suite passed so later
performance replay cannot silently retune relationship search bounds.

Co-authored-by: Cursor <cursoragent@cursor.com>
Strip carrier-coupled evidence predicates to Never, delete unused scoring
and probe leftovers, and ignore runtime packet tests that still expect
deleted flow taxonomies.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stage sealed core generations under core/generations with atomic
publication.json pointers and process-crash matrix coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replay retrieval lexical base/delta compaction, incremental core wall
receipts, and the incremental refresh microprobe onto the clean head.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace exact-candidate warm_ms=wallMs aliases with InstalledAgentTimingV1
phase fields and cohort ids shared across ABBA arms.

Co-authored-by: Cursor <cursoragent@cursor.com>
Skip dense-anchor writes on sealed cores and advertise
verify_indexed_direct_calls in plugin guidance and static checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
Strengthen the packet generalization boundary for ownership predicates,
domain PacketEvidenceRole variants, and holdout probe spellings, then delete
those production selection paths on a new r2 candidate.

Co-authored-by: Cursor <cursoragent@cursor.com>
Delete holdout probe matcher/limit/alias tables that steered capping after the
r2 Phase 9 FAIL, and strengthen the boundary checker to catch normalized and
space-separated leakage shapes.

Co-authored-by: Cursor <cursoragent@cursor.com>
@TheGreenCedar TheGreenCedar changed the title [codex] 0.18 r3: identity-only required-probe seam [codex] 0.18: decontaminate packet planning from holdout taxonomies Aug 31, 2026
@TheGreenCedar TheGreenCedar changed the title [codex] 0.18: decontaminate packet planning from holdout taxonomies [codex] 0.18: decontaminate packet planning; repository evidence; indexing/verify surfaces Aug 31, 2026
TheGreenCedar and others added 9 commits August 31, 2026 12:36
Align publication proof filters and cache topology with the renamed
immutable-generation crash matrix, keep CoW fail-closed in production while
allowing a test-only stage copy on non-reflink filesystems, and restore the
pinned retrieval-generalization job shape.

Co-authored-by: Cursor <cursoragent@cursor.com>
Refresh release-claim graph digests after the proof-command rename, and
update the incremental begin test to the unpublished-stage contract that
keeps the inherited proof overlay.

Co-authored-by: Cursor <cursoragent@cursor.com>
Delete fixed task_class_seed_queries injection, stop elevating soft plan
seeds into sufficiency/required probes, and rank required probes by
path/symbol identity only so soft token coverage cannot steer the cap.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep PacketPlanQueryDto on the runtime lib path, drop unused seed/SQL
helpers that trip deny-warnings, ignore formula-dispatch R6 tests, and
sync the draft cache topology fixture so policy mutations still fire.

Co-authored-by: Cursor <cursoragent@cursor.com>
Rewrite the sealed-receipt reuse lookup for clippy, enable a test-only
full-copy fallback when CoW clone is unavailable, and stop writing
published cores through the live path.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
TheGreenCedar and others added 9 commits August 31, 2026 19:17
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ve-outs

Co-authored-by: Cursor <cursoragent@cursor.com>
TheGreenCedar and others added 4 commits September 1, 2026 06:04
Stop fabricating continuation time from leftover wall clock, reconcile phases unrounded, and round once so warm_ms stays a measured sum.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the CoW write probe, derive clone_shared_bytes from apparent minus allocated, and scope unreadable subtrees instead of treating a blocked prefix as a full-scan zero.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy the published core generation rather than leftover logical databases, then swap publication.json atomically so a crash cannot leave a mixed generation.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace host-translated JSON with a grammar that owns its own clauses, fail closed when provenance is unavailable, and activate core-only for exact verification instead of starting embedding sidecars.

Co-authored-by: Cursor <cursoragent@cursor.com>
TheGreenCedar and others added 3 commits September 1, 2026 18:02
@TheGreenCedar TheGreenCedar changed the title [codex] 0.18: decontaminate packet planning; repository evidence; indexing/verify surfaces [codex] 0.18: decontaminate packet planning and repair the substrate Sep 2, 2026
@TheGreenCedar

Copy link
Copy Markdown
Owner Author

Horizon A is accepted at exact head 62bc6f3f8d1d7291c6258f2639efc912cfe06bba against base a41e605ea01e9e2c8b400eb5ee5456efd05f060e.

Independent adversarial review found no counterexample in the frozen boundary matrix. It directly covered renamed and encoded prompt steering, SQL synthesis and ranking, basename authority, magic evidence roles, pre-hydration admission of the seventeenth identity, unadmitted graph endpoints, the exact 16 KiB packet boundary, post-pointer committed/unconfirmed publication semantics, literal timing intervals, and the proof-enabled November 2024 transport path.

All focused exact-head checks and required PR checks passed. This accepts the Horizon A foundation only. It makes no unseen-accuracy, performance, product-qualification, version, calibration, packaging, promotion, or release claim. Those remain downstream of #2106 and the accepted 0.18 qualification plan.

The packaged CodeStory MCP was unavailable to the independent reviewer, so that review used ordinary source inspection and focused local tests.

@TheGreenCedar
TheGreenCedar marked this pull request as ready for review September 2, 2026 07:11
@TheGreenCedar
TheGreenCedar merged commit 7794d6e into dev/codestory-next Sep 2, 2026
14 checks passed
@TheGreenCedar
TheGreenCedar deleted the codex/2099-v018-decontamination-r3 branch September 2, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant