Skip to content

Verification stack: #2939 order-centric reconcile merged over the #2815 dev line (#2915 #2821) - #2964

Merged
ranxianglei merged 7 commits into
2026-10-11_marker-declarativefrom
2026-10-13_verify-stack
Oct 13, 2026
Merged

ranxianglei merged 7 commits into
2026-10-11_marker-declarativefrom
2026-10-13_verify-stack

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

What

Verification stack: merges #2939 (order-centric reconciliation: Pass 0 resync + tool-id twin claiming, #2915/#2821) into the dev line (#2815 marker declarative + #2949 session-resolve v2 + #2963 identity columns).

Per the maintainer's call: #2815 stays unmerged until the whole session-matching wave is verified together — this branch is that verification vehicle.

Why a merge, not more work

Local matrix (this branch)

Suite Result
fold-reconcile + issue2915 + positional 65 + 14 + 24 = 103 pass
marker-lane-coverage / render-contract 7 + 2 pass
dsh-persona-fingerprint / session-continuity-proof / issue2944 skeleton / 2601 / fork-adoption / 2817-crosswire 8 + 9 + 8 + 6 + 4 + 1 pass
issue2082-dsh-recovery 3 red = known local env-class (clean master red locally too; CI green)
tsc clean

Real-machine verification (dsh shapes, model switch, fork, GitHub issue replay, old-ladder alignment) follows on this branch.

prepared by an agent under the local git identity (ranxianglei), human merge required

ranxianglei and others added 7 commits October 12, 2026 23:00
#2821 replay: a mid-session model switch re-minted every tool-call id on
re-projection (content byte-identical). Both Pass 0 flank scans died at
their FIRST cell (changed preamble at the head, appended turn at the tail):
byPos=0, 3289 covered ids missing, three drift passes -> "substrate
destroyed" -> total unfold -> ~4MB raw out -> doomed-probe 502. The order
was intact the whole time; only its evidence was id-gated.

Owner rule (2026-10-12): 顺序为中心, hash 为辅助 — order is the carrier,
content the per-cell gate, the id a fast path; no single dimension's miss
may cascade into total unfold.

- Pass 0 resync: a fingerprint mismatch is a gap, not a wall — scans
  resync at the next run of MIN_RESYNC_RUN consecutive same-index
  agreements (gaps bounded by MAX_RESYNC_GAPS) and keep claiming verified
  spans behind the break; order breaks are observable
  ("N order break(s) resynced" in the drift line).
- Pass 1.5 (#2396 detection promoted to claiming): re-minted tool-call
  ids with byte-identical normalized content are claimed k-th-to-k-th
  with the byNorm length guard — the fallback when no stored positional
  copy exists. After one churn pass the self-saved {ids, canon} copy
  upgrades recovery back to the positional path.
- Escalation semantics: "substrate destroyed" only counts gaps that
  survived resync AND the content passes.
- unchanged: "never fuzzy similarity" — the hash stays a HARD per-cell
  gate (mis-attribution discipline); genuinely edited cells stay
  honestly unmatched and re-enter the wire.

AGENTS.md §2 gains the order-centric principle as design decision #11.
Tests: tests/issue2915-order-centric-reconcile.test.ts (2821 replay,
mid-island resync, insertion offset, twin claiming incl. rerun-twin
rejection + k-th families, three-generation escalation lifecycle).
…twin-claim pass

Review supplement for #2939: the comment claimed 'both claim passes key on
the toolCallId itself', which stopped being true once Pass 1.5 (#2915)
promoted content-identical twins from detection to claiming. Reworded to
state what the counter actually reports now: suspects that survived EVERY
claim pass (length-guard rejects, exhausted duplicate families, real
edits) — detection evidence only, never a repair target.
…2915 review gaps 2+3)

Review feedback addressed with two additive cases in the #2915 suite:

- pre-latched escalation: a session that latched foldDriftEscalated under an
  OLDER build (where re-mint churn could not recover) persists exactly that
  triple across the upgrade; the first recovered pass must clear latch +
  streak + since, or every LATER episode stays silently latched (#2297
  contract). Production sessions crossing this upgrade are exactly this shape.
- mid-list deletion: net-negative offset absorbed by the dual flanks, the
  deleted cell is the only honest loss, the cell after the gap re-anchors
  past it (insertion was covered; deletion was only exercised via the older
  suites — it is the compaction-adjacent direction).
Review feedback (accept-level compatibility note): Pass 1.5 requires
anchor.m; anchors persisted before the #2396 era lack it and skip the twin
pass. Realistically an empty set today (backfilled while present verbatim),
but documented now so the skip reads as intentional, not accidental.
Owner rule 2026-10-12 — tiered fallback for Pass-0 gap cells:
any exact channel → simhash corroboration (≤8 bits, measured margins)
→ order bracket (same index strictly between VERIFIED claims asserts
the SLOT — owner-sanctioned delete+insert tradeoff); deletion stays
honest loss (flanks absorb the shift, no bracket claim for the deleted
id); zero corroboration stays honest drift.

- FoldAnchor.sh simhash sketch (absent on pre-field anchors → graceful)
- bySim/byOrder counters plumbed through plan/result/DBG/drift logs
- gapPairs + claimedIdx recorded by the Pass-0 scans
- unmatched loop moved AFTER gap resolution (ordering bug: claims were
  computed after unmatched had already frozen)
- review gap ②: latch-recovery test — 3 total-loss passes latch once
  (#2297 single error line), healthy resend clears the latch, escalation
  reaps the substrate (#2695), lane continues clean
- review gap ③: mid-column deletion test — flanks absorb, honest loss
- simhash-tier unit: one-word re-render of a long line corroborates;
  negation/drop/reorder measured OUTSIDE the gate
- AGENTS.md #11: gap-resolution tiering appended

Closes review items on #2939; refs #2821
…view)

The comment described a near-JSON key-reorder payload (measured ~8 bits)
that this case no longer uses; the code tests a prose sentence with one
word varied (~6 bits), which the following comment block already states.
Comment-only fix, no behavior change.
@ranxianglei
ranxianglei merged commit 60603ad into 2026-10-11_marker-declarative Oct 13, 2026
ranxianglei added a commit that referenced this pull request Oct 13, 2026
…ot turn-1, #316)

The v2.2 resolver minted a |sub:aux lane for ANY tag-less shallow history
on a virgin id. Codex root threads start exactly that way — one user
message, often with EMPTY instructions — so the root turn keyed itself
onto <id>|sub:aux instead of the session-id header key, splitting the
root thread across two sessions (codex-turn-isolation regression, 4 CI
test lanes red on the #2964 head).

First sight now always claims the raw key, matching the kernel's anchor
semantics (an empty system is non-anchoring: it rides whatever the id
holds). The #1916 review-steals-raw race needs no first-sight guard:
reviews arrive on an id the main turn already claimed, so they hit the
recorded branches and fork onto a lane there.

The corpus census expectation moves with it: aux-shaped first requests
(blob/tiny, 119 sessions) claim instead of deriving — same-session
mapping is unchanged, only the lane mint is gone.
@ranxianglei
ranxianglei deleted the 2026-10-13_verify-stack branch October 15, 2026 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant