Repository navigation
[PR] align master with v0.1.207 (shipped from bugfix-v0.1.206) - #4659
github-actions[bot] wants to merge 16 commits into
Conversation
) Four p2 fixes from the five-dimension storage review, one PR: - identity column: cross-save JOIN key strips id/wireIndex (D4-1); content_hash stays the byte-faithful CAS key. v8 migration backfills and heals wireIndex-split generations (keep lowest seq, refund CAS refs). MySQL twin via information_schema probe + idempotent ALTER. - authoritative sweep retires absent rows (retired_at tombstone) instead of DELETE; rewind-redo reactivates in place at the original seq (remap covers completeLog-less saves too); readers filter retired rows (D4-2). - snapshot-render seam image signature hashes the bytes (24-hex sha256), not the length — same-size screenshots can no longer chain a false seam into silent truncation (D4-3). - fork lineage: parent_session_id from metadata.derivedFromSessionId (D3-2). - gc full vacuum routes through vacuum() (TRUNCATE checkpoint included, files actually shrink, D5-1); loadLegacyView counts tail pointer gaps and all three load paths warn instead of silently shrinking (D4-5). Stakes first: tests/storage-review-p2s.test.ts (7), storage family + golden/snapshot/fold-reconcile/incremental/web regressions green.
Review fix for CI reds on this branch, part 1 of 2. - loadLegacyView's new tailGaps counter (D4-5) leaked into the shadow-parity digest surface: the expect leg (live session) structurally lacks the key while the got leg (loadLegacyView output) always carries it, so canonicalize()'s key-preserving normalization made every sampled verify report a fake drift. Drop the key from all digests — same class as the existing storageMode precedent (#2671): presence-not-value, and genuine missing rows still diverge the message arrays themselves, so nothing is masked. describeViewDivergence skips it too, keeping drift diagnostics clean (issue3919 forensics pins keys deepEqual). - Two stale user_version=7 pins the v8 bump missed: tests/storage-ext.test.ts (v3→v7 title/asserts) and tests/storage-ingest-watermark.test.ts (v4→v7 title/assert) now expect v8, matching the updated pin in tests/storage-unified.test.ts.
…e degrade (#4444) On a Node.js that has neither the builtin node:sqlite (< 22.5) nor a pinned better-sqlite3 artifact (e.g. Node 21.x, ABI 120), the engine self-bootstrap is refused before any download and the unified store degrades to legacy-only. The degrade reason on the unsupported-node path carried the specific coverage detail but DROPPED the "upgrade Node.js to >= 22.5" lever that the sidecar-open path already carries — so a Node 21 user read "no engine supports this Node.js" with no actionable way out. - runtime-status degradeReason(): append nodeSqliteUpgradeHint() to the unsupported-node reason (keeps the #3894 specific-detail-first ordering). - engine-bootstrap runBootstrap(): carry the same hint on both skip warns so the lane logs match the status surface. - shadow UnifiedShadow sidecar-open catch: stop advising "delete the file to reset the index" for a no-engine failure — deleting cannot conjure an engine; that advice only fits a genuine open failure (byte-identical otherwise). - regression test: force process.versions.node=21.6.1 and assert the acp_status STORAGE line carries both the coverage detail and the >= 22.5 upgrade lever. Refs #4444
…s but bytes diverge Review fix for CI reds on this branch, part 2 of 2. The D4-1 JOIN migration made remapPlanToAbsolute reuse a seq whenever (msg_id, identity) matched, and INSERT OR IGNORE then silently kept the first generation's bytes for that seq. Any byte divergence under a matching identity became permanently unhealable by full ingest: (a) head truncation — the PR's own flagship scenario — leaves stored rows carrying the old wireIndex generation, so the parity digest never matches the live view again: every 20th save reports drift, the watermark is cleared, the next full save re-runs the same no-op remap, never converges, and after DRIFT_ESCALATE_STREAK consecutive samples #4323 freezes this process's envelope writes (legacy file goes stale = data-loss vector); (b) an externally corrupted CAS row (watermark boundary-tamper test) was healed pre-migration by the byte-faithful join minting fresh rows, and is now kept corrupted forever. Fix: when the full path reuses an existing seq via the identity join and the stored content_hash differs from the plan row's hash, UPDATE the row in place to the fresher authoritative bytes (CAS ref juggling put-new -> update-ref -> release-old, FK/refcount safe; media mappings untouched because identity includes the {$media:hash} markers). Seq stability is unchanged; the delta path stays append-only. SQLite + MySQL twins. identity.ts doc updated to match; CHANGELOG notes the behavior change.
…ning silently (#4215) C10a of the #3011 family checklist (#3025): the #4215 incident showed a seeded fork child (isSeeded + correct parentSession) with ZERO adoption trace in the whole log - eight silent early returns made "not a fork" vs "a fork we could not see" unanswerable after the fact. - forkChildOf() becomes exported forkChildVerdict(): names all eight shapes (initiator-threw/-missing, session-missing, sid-missing, header-missing, not-seeded, parent-missing, parent-is-self) - a seeded candidate blocked at an entry gate (tools-ready / body-parse / side-shaped / proxy-base) logs once per session naming the gate - malformed seeded lineage (isSeeded without a usable parentSession) logs a warn once per session - ambient-blind shapes (fork status undeterminable) log ONE info notice per process, flagging whether scoped #4082 attribution was active - the C10b identity-route split named in the log - plain non-fork traffic stays completely silent Log-only change: no judgment, ordering, or wire behavior changes. Regression suite: tests/issue4215-fork-gate-diagnostics.test.ts (verdict matrix + both directions of every gate, #3617 discipline). Identity-route widening (C10b) needs an owner decision and is NOT part of this change. (cherry picked from commit fb54f6e) (cherry picked from commit 85af00f)
#4264) When the resume-inheritance gate passed but no byte-exact chain match existed, handle.ts emitted zero logs — clone-inheritance failures (the #3011/#3025 family) were left unattributable; dsh (responses protocol) could not even reach the transcript-lineage log lines, so a miss was absolute silence. Add PrefixAffinityResolver.diagnoseResumeMiss (diagnostics only, matching untouched): it re-runs the same gates in reporting mode and classifies the closest near-miss as equal-depth (duplicate conversation by design), prefix-break (head drift desynchronizes the prefix), or truncated (incoming shorter than the stored chain). The per-item divergence scan runs once on the single best near-miss over its stored trailing window (cost-bounded); deep chains report the pre-window bound instead of an unsound index. The server logs one line: info with best candidate id + depths + first divergence cell + 8-hex digests when any eligible candidate exists, debug when nothing eligible was tracked. Reuses MIN_RESUME_PREFIX=8; no new config surface, no behavior change. Tests: the three miss shapes plus truncated, deep-chain pre-window break, scoped declared-parent states (untracked/too-shallow), scoped judging-only-declared-parent, self-exclusion, and hit-path regression (findResumeParent/findResumeParentWithin results unchanged). (cherry picked from commit 7fff50a) (cherry picked from commit c1272ae)
…4265 review) When any gate conjunct short-circuits (derivedFromSessionId, publicForkReceipt, or resumeInheritance=false) there was no [resume-inheritance] line at all, so a log without "miss:" stayed ambiguous between gate-skipped, pre-#4265 build, and miss. The gate's else-branch now logs one debug line naming the skip reason. Same failure domain as #4264's stated goal (is the fallback channel even being tried) — absorbed here rather than a separate PR. Bounded like the miss line: the else-if re-checks clientProvided && requests === 0, and stats.requests increments later in the prepare lanes, so it fires at most once per session lifetime; anonAffinity is structurally null on this path (only the anonymous lane sets it). Purely additive — the gate condition itself is untouched, matching is unchanged. New e2e pin (tests/resume-inheritance-gate-skip.test.ts): both directions — skipped gate logs exactly one bounded debug line naming the reason, and an unskipped gate keeps the existing miss line and never says skipped. (cherry picked from commit f3f7578) (cherry picked from commit ea712f8)
…review) ResumeMissCandidate / ResumeMissReport are referenced only inside prefix-affinity.ts (describeResumeMiss consumes them); the leading export made them dead external surface and tripped the unused-exports gate, which fails the release-bugfix full-CI gate. Drop the export keyword only - type-level, internal references intact, no behavior change.
…bugfix.yml v2) Same file as master's f009043 (#4653). GitHub executes the BASE (lane-side) copy for pull_request_target events, so this must land on the lane BEFORE the first merge-gated publish can fire. This merge itself cannot publish (at merge time the event still runs the older lane-side copy, which has no such trigger): armed, not fired.
[PR] release: arm merge-gated lane publish (lane-side release-bugfix.yml)
Master-first on all 8 conflicts — master carries the same lane work (cherry-picked #4390/#4506/#4444/diagnostics) evolved further (#4316 seq-ledger layers, #4608 block-bounds CASE upsert, #4241 judge baseline, #4491 plugin server history, #4545 hygiene): - .github/workflows/release-bugfix.yml: keep master v3 gate-branch model (supersedes v2 lane-side armed trigger, 2026-10-25 owner decision) — this also disarms the lane post-merge - src/storage/identity.ts, src/storage/store.ts: master versions (ledgerSeq identity stripping, #4608 CASE upserts, cloneSessionRows) - src/prefix-affinity.ts, src/agent/dsh-native.ts + 2 test files: master versions (same diagnostics, further evolved) - CHANGELOG.md: master side verbatim (lane side was a byte-identical subset already present under ### Fixed) Net effect vs master: package.json 0.1.207 + lock + release-notes entry (pure version alignment; content already on master). Verified: typecheck clean; tests 23+33 pass (diagnostics, storage-review, storage-unified, ingest-watermark, seq-ledger); build OK.
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.5716-pr.4659.e26d6c5This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr4659.tgz
npm install -g packageInstall instructions are refreshed on each push. |
…he version bump (#4659, owner call)
|
(ai: zhipuai-lb/glm-5.3) 关闭本 PR,由 #4673 接替(同样的对齐目标,v3 标准形状:head= 原因:本 PR 的头是车道分支 处理痕迹:车道分支留在 22e09b2(含此前解决冲突的 merge + release-notes 撤回两个提交,均已废弃);已发布的 0.1.207 历史完整保存在 tag v0.1.207。release-notes 条目按 owner 决定不进台账。 master 自身 test 矩阵当前 6/11 分片红(#4599 救火中,与对齐无关),#4673 会在 master 转绿后随之变绿。 |
Auto-opened by Bugfix Release right after v0.1.207 shipped from
bugfix-v0.1.206(post-merge sha7e69b49ff4facb00b5ba6541b48d0f7fbe63d63d). Structural conflicts vs master are EXPECTED — the lane is based on an older tag while master moved on; resolve master-first, keeping only lane-unique content (release notes, advisories, diagnostics). Merging this PR completes the release cycle.