Commit Graph
4991 Commits
Author SHA1 Message Date
awork 00a1f2432d fix: suppress DSH model-side compress surface (host-scope tool unreachable) (#3177) 2026-10-16 02:47:49 +08:00
ranxianglei 6ee4a2ac98 Merge pull request #3289 from ranxianglei/2026-10-15_output-text-run-guard
Add single-codepoint repetition lane to the output-side runaway guard (Closes #3260)
2026-10-16 00:12:19 +08:00
ranxianglei bce26b64fc Merge pull request #3053 from ranxianglei/2026-10-13_kernel-prune-order-pairing
fix(kernel): order-based tool-call/result pairing so duplicate host ids don't brick sessions
2026-10-15 23:47:51 +08:00
ranxianglei b726fb4444 Merge pull request #3268 from ranxianglei/2026-10-15_recommend-apply-integrity-shared-judgment
recommend/apply 共用一个区间可折叠性判定:acp_status 不再推荐必然被拒的区间
2026-10-15 23:46:39 +08:00
ranxianglei 1169e77daa Merge branch 'master' into 2026-10-15_recommend-apply-integrity-shared-judgment 2026-10-15 23:46:20 +08:00
ranxianglei a2a3b0eed0 Merge pull request #2987 from ranxianglei/2026-10-13_lineage-persist-window
fix: persist derivedFromSessionId immediately at lineage establishment (#2986)
2026-10-15 23:36:34 +08:00
ranxianglei a2a6db3e1b Merge pull request #2492 from ranxianglei/wt-2489-ework-daemon
feat(web): zoom-to-selection (brush) for the session context-trajectory chart
2026-10-15 23:35:41 +08:00
ranxianglei 4b9862911a Merge pull request #3080 from ranxianglei/2026-10-14_output-budget-floor
fix: floor the ceiling-less starved output budget at an absolute minimum (#3071)
2026-10-15 23:31:10 +08:00
ranxianglei e479ed3df6 Merge pull request #3295 from ranxianglei/2026-10-15_remove-image-compression
feat!: remove image pre-compression and the image_full tool (#3266)
2026-10-15 23:24:13 +08:00
awork 3c815e5ee4 chore(#3295): re-trigger CI — kernel-change declaration was added to the PR body after the last push
kernel-guard snapshots github.event.pull_request.body at dispatch time
(ci.yml PR_BODY), so the runs triggered by the review-fix commits still
carry the pre-marker body and would fail on a red herring. This empty
commit produces a fresh pull_request event whose payload includes the
declaration.
2026-10-15 23:21:39 +08:00
awork 9c0efb9995 test(#3295): make the #3266 back-compat corpus pin real
The first commit regenerated the corpus after stripping the legacy
image keys, so tests/storage-corpus.test.ts asserted 'keys must NOT
materialize' against a fixture that never carried them — a vacuous pin
while the PR body claimed the corpus pinned back-compat.

The generator now re-injects the pre-#3266 keys into the on-disk record
after the normal write (writeAndPin mutateFiles hook), so the fixture
carries exactly what an older version persisted. Verified load behavior
pins honestly: whitelisted readers DROP stats.imageShrunk*/imageFull*
and state.imageShrinks/imageFullRestored; metadata is an opaque host
bag and passes THROUGH (legacy imageShrinks survives as inert data —
the digest covers the loaded view, so it pins that split). All case
digests shift because the kernel state.stats blob lost its three image
fields; folded/zstd pair stays byte-identical.
2026-10-15 23:10:30 +08:00
awork 5bcc34569c fix(review): finish the #3266 removal — orphaned kernel image types/stats fields + stale comments
Review of the main removal commit left dead code behind: ImageFormat/
ImageBillingMode type aliases and the CompressionStats imagesShrunk/
imageBytesSaved/imageTokensSaved fields (seeded by createInitialState,
asserted in the kernel persist test) had zero remaining readers after
src/image-compress.ts went away. Removed them and reworded three
comments that still described the image_full restore channel as live.
2026-10-15 23:10:30 +08:00
ranxianglei 74456f36b9 Merge pull request #3291 from ranxianglei/fix/3235-conflict-banner-ux
web: conflict banner = interception-failure alarm + dismissal + one-click report (#3235)
2026-10-15 22:50:10 +08:00
ranxianglei cbcebcf2b9 Merge pull request #2930 from ranxianglei/2026-10-12_auto-mode-classifier-forge
feat: forge Claude Code auto-mode classifier verdicts locally (#2740)
2026-10-15 22:45:09 +08:00
ranxianglei 1336fc76ed Merge pull request #2754 from ranxianglei/2026-10-11_pi-compress-stub-replay
fix: reject byte-identical display-stub re-submission as compress summary (#2749)
2026-10-15 22:44:35 +08:00
ranxianglei 44eea7f234 Merge pull request #2721 from ranxianglei/2026-10-11_preflight-payoff-order
fix: dispatch preflight folds by payoff, keep the recent zone last-resort (#2682)
2026-10-15 22:44:04 +08:00
ranxianglei 2a296a4cc6 Merge branch 'master' into 2026-10-15_remove-image-compression 2026-10-15 22:42:29 +08:00
ework-agent da584866f6 chore(#3295): drop imageCompression from website config reference and docs page 2026-10-15 22:41:23 +08:00
ranxianglei 58df3fd850 Merge branch 'master' into fix/3235-conflict-banner-ux 2026-10-15 22:40:32 +08:00
ranxianglei ddf950aa1e Merge branch 'master' into 2026-10-12_auto-mode-classifier-forge 2026-10-15 22:37:50 +08:00
awork b98ff35080 docs: mirror the #3235 compaction-disable recipe + banner policy into CONFIGURATION.zh-CN.md (review fix)
CONFIGURATION.md got the strong disabled:true variant, the preset-ptc/cordis
resurrection trap, and the new banner alarm policy, but the zh-CN mirror was
left on the old weak auto:false-only recipe (AGENTS.md zh/en sync rule).
Mirrored all four sections verbatim from the en text.
2026-10-15 22:37:41 +08:00
ranxianglei aa90f3a09e Merge branch 'master' into 2026-10-11_pi-compress-stub-replay 2026-10-15 22:37:37 +08:00
ranxianglei 30741ab77f Merge pull request #3271 from ranxianglei/2026-10-15_fix-3269-e2e-persist-wait
test(#3269): e2e-native-opencode 断言改为等待 shutdown flush 落盘,消除固定睡眠竞态
2026-10-15 22:33:12 +08:00
ranxianglei 9baa3d4ad4 Merge pull request #3283 from ranxianglei/2026-10-15_fix-3274-deadend-cooldown-flake
fix: #3274 keep preflight dead-end cooldown warm across slow CI retries
2026-10-15 22:31:38 +08:00
ranxianglei ba456cfff2 fix two CI reds found on this PR's matrix: family gate + stale #3148 expectation
1. src/web/diagnostics.ts used a raw .slice(-8) for the shortened session id
   in the new conflict-banner blob — the #816/#1615 family gate (text-safe
   scan over src/) correctly flagged it. Switch to safeSuffix from
   src/text-safe.ts (surrogate-safe by construction).

2. tests/issue3148-upstream-circuit.test.ts pinned the pre-#3071 clamp
   expectation (capped 1360); #3071's capability floor lifts the cap to
   max(1360, min(4096, raw headroom)) = 4096 for the reporter's exact numbers.
   Both PRs landed in the same window and master push CI skips the test
   matrix, so the stale expectation surfaced as 3 red legs on the next PR to
   run the matrix (this one). Aligned with the merged #3071 contract and
   documented the math in the comment.
2026-10-15 22:29:56 +08:00
ework-agent 700722db9f feat!: remove image pre-compression and the image_full tool (#3266)
The opt-in compress.imageCompression pass and its image_full restore
channel are structurally broken where they matter most:

- hosts that reject bili-injected tools (codex) can never deliver the
  restore call — the downscale is permanent for them (#3270 disarmed
  the lane, which proved the tool was dead weight there);
- where the tool IS injectable, the model has no reliable way to learn
  the ref of the downscaled message (no ref annotations on the wire),
  producing the 38-round guess-reject-resend loop from #3266 (cache
  hit 75% -> 28%).

Remove the whole feature from host and kernel: arrival-time downscale
pass, image_full injection + sticky restore + fail-streak guardrail,
image stats, persistence keys, wire-contract tool variants, config
schema, docs, and the sharp optional dependency. Every image now passes
through byte-identical at original resolution.

Sessions persisted by older versions load unchanged; legacy
imageShrinks/imageFullRestored state keys and imageShrunk* stats are
ignored on load (storage corpus pins that as a fixture).

kernel 0.0.126.
2026-10-15 22:28:01 +08:00
ework-agent 7e67dd5462 fix: reject byte-identical display-stub re-submission as compress summary (#2749) 2026-10-15 22:24:58 +08:00
ework-agent f503e869c3 Merge master into 2026-10-11_preflight-payoff-order (resolve preflight.ts)
Only conflict: the #2682 dispatch rework and #2952 tier-distillation
recovery both touched the same declaration spot. Kept both sides
(union): the fold-order log flag plus the whole #2952 recovery block —
they are independent (dispatch ordering vs exhaustion-path recovery).

Verified on the merged tree: tsc --noEmit clean after kernel rebuild;
preflight family 189/189 green including issue2682 payoff-order (3),
issue2952 tier-recovery (5).
2026-10-15 22:16:09 +08:00
ranxianglei d86e99a5ba merge master into 2026-10-11_auto-mode-forge (resolve conflicts)
master moved past the PR base (#3273 incremental lane, #3199 unified web
lists, codexForge kind=prompt, network.allowPrivateHttpProviders docs).
Conflicts were all additive:

- src/server.ts: keep master's codexForge kind union (+"prompt") AND the
  PR's autoModeForge Prepared field.
- src/server/handle.ts: combined import lines (knobs + auto-mode-forge +
  v1internal); PR interception point verified to still run BEFORE the
  #388 side-request split.
- CONFIGURATION.md / CONFIGURATION.zh-CN.md: keep both new env-table rows
  (BILI_ALLOW_PRIVATE_HTTP_PROVIDERS, BILI_AUTO_MODE_FORGE), alphabetical.

Verified: tsc clean, 56/56 (auto-mode-forge + e2e-anthropic + web-i18n +
text-safe), test-suite-lock gate, import-graph gate, build OK.
2026-10-15 22:04:29 +08:00
ranxianglei 50b093eccf web: conflict banner alarms only on landed-unrecovered evidence + dismissal + report buttons (#3235)
Directive 4 — the banner is an alarm for interception FAILURE, not a ledger
viewer: bili_conflictSeverity now exposes a landed tier (hasConfirmed ||
unannounced-rewrite signal) and the render gate requires sev0.landed, so
suspected-plugin stock, sibling stock, display-only viewers, and recovered
(intercepted+rebased) landings stay recorded in acp_status / stats but never
pop the banner. #2912 neutralOnly stands-down preserved.

Directive 2+3 — new 不再提示 (don't show again) button: dismissal persists in
localStorage as a {lastAt, events} watermark so it survives reloads and new
sessions (users reported the banner stalking them across sessions), yet the
alarm re-arms automatically the moment a NEWER event lands — dismissal can
quiet stock, never mask fresh evidence.

Directive 5 — the banner now carries the #3040 report buttons (copy
diagnostics / report on GitHub) via a new conflict-banner diagnostics topic
that serves the aggregated conflict ledger summary (sessions/events/kinds/
classification/newest-per-session, session ids shortened) as a copyable blob
and a prefilled issues/new URL.

Directive 1 (docs) — CONFIGURATION.md #2474 recipe rewritten: strong variant
disabled: true on the nested compaction-basic row (the component actually
turns off, same mechanism dsh uses on the host plane) over the weak
auto: false variant, with the preset-ptc/preset-cordis resurrection trap
called out; BILI_CONFLICT_SCAN row documents the new banner policy.

Tests: web-conflict-banner +7 (landed-tier matrix incl. rewrite-signal-only
and recovered-only quiet, dismiss watermark re-arm semantics incl. corrupt
storage, gate/source assertions), web-storage-banner +1 (conflict-banner
diagnostics topic serves ledger section + decodable issue URL).
2026-10-15 21:54:28 +08:00
ranxianglei 62b86e5556 Merge pull request #3263 from ranxianglei/2026-10-15_proof-g4-claimcoupling
test: harden theorem lane -- claim-coupling mutation twin + raw-id grounding (#3198)
2026-10-15 21:49:00 +08:00
ranxianglei acb3ad6c3f Merge pull request #3244 from ranxianglei/2026-10-15_tag-echo-chunk-determinism
fix: 同一段模型回复按不同 SSE 分包过滤后结果不同的非确定性问题 (#3198)
2026-10-15 21:48:21 +08:00
ranxianglei a034d7f0e8 Merge pull request #3270 from ranxianglei/2026-10-15_image-full-lane-gate
fix: image_full 死循环(#3266)——codex lane 上 restore 通道结构性不可用:按宿主门控 + 提示/回执列出可恢复 ref
2026-10-15 21:44:58 +08:00
awork 880d1ccc78 fix: add single-codepoint repetition lane to the output-side runaway guard (#3260)
Port pi's findDegenerateRuns minRun semantics (200) onto the existing intrinsic
stream terminator: a model stuck in a symbol loop (#3946: one symbol string for
~22 minutes) now trips the stream mid-generation instead of running to
max-output or manual abort.

Detection runs on DECODED model text only — per-frame JSON walk over text-family
keys (openai delta.content/reasoning_content, anthropic text_delta/thinking_delta,
responses top-level delta, google parts[].text). Tool-call arguments are excluded
(#1039 user intent), and Responses cumulative snapshot events (.done/.completed/
.incomplete) are skipped so runs are never double-counted. Every frame is parsed:
token-granular streaming interleaves framing bytes between identical characters, so
a raw run-length pre-gate would stay blind to the incident shape. NDJSON bodies
(bare-newline events) are handled by a fallback splitter; byte-exact forwarding and
the clean-EOF trip contract are unchanged. Always on, zero new config.

Also neutralizes the trip log wording in relay.ts (two sites): it said 'runaway
enumeration detected' even when the reason is now text-run.
2026-10-15 21:43:51 +08:00
ranxianglei 545db5f81a Merge pull request #3277 from ranxianglei/2026-10-15_ccr-codex-lane-disarm
fix: #3272 disarm CCR arming on the codex responses lane (unroutable acp_retrieve)
2026-10-15 21:31:34 +08:00
awork b07444b20a kernel: bump acp-kernel 0.0.125 -> 0.0.126 — master consumed 0.0.125 via 164f5d9e4, which erased this PR's version delta in the clean auto-merge and tripped kernel-guard rule 2 (#3236) 2026-10-15 21:00:04 +08:00
ework-agent 49039fdbc0 kernel: order-based tool call/result pairing in prune guards (#3046)
Pair by order, not id-set membership: a result needs a same-id call EARLIER
in the view (forward pass), a call needs a same-id result LATER (backward
pass). An id-set cannot tell two instances apart when a host re-issues the
same tool-call id for different calls (Agent Teams name:index ids), so a
half-pair whose own partner was folded away used to survive because a
different same-id partner was still visible - shipping an unpaired role:"tool"
message (upstream 400 "tool_call_id ... is not found") or an unanswered
tool_call ("... did not have response messages") and bricking the session.

Unique-id sessions behave identically to the old set lookup; one call still
answers any number of same-id results (precedence, not multiplicity); compress
calls stay exempt.

Fixes #3046
2026-10-15 20:52:59 +08:00
ranxianglei 6b5b28317f Merge pull request #3234 from ranxianglei/2026-10-15_preflight-resign-egress
fix: re-sign the preflight summarization egress over its own body (#3226)
2026-10-15 20:50:59 +08:00
ranxianglei 9cc591db71 Merge pull request #3229 from 0XCocoa/2026-10-15_codex-mid-history-developer
fix: preserve Codex mid-history developer items on Responses proxy
2026-10-15 20:47:00 +08:00
ranxianglei 279a7d916d Merge pull request #3251 from ranxianglei/2026-10-15_fix-zcode-self-tunnel
fix: serve self-addressed absolute-form requests locally instead of self-denying them (ZCode, #3245)
2026-10-15 20:44:39 +08:00
ranxianglei ea0dbe7932 Merge branch 'master' into 2026-10-15_recommend-apply-integrity-shared-judgment 2026-10-15 20:41:42 +08:00
ranxianglei 7a3f22f476 Merge pull request #3101 from ranxianglei/2026-10-14_planning-floor-min-output
fix: floor the #2490 planning-clamp output at a 4096 capability minimum (#3071)
2026-10-15 20:30:08 +08:00
ranxianglei c8c4cae923 Merge branch 'master' into 2026-10-14_planning-floor-min-output 2026-10-15 20:29:30 +08:00
ranxianglei 0e9360a35c Merge pull request #3273 from ranxianglei/2026-10-15_incremental-native
Incremental turns phase 2: marker divert on ordinary model requests + native client helpers (#3248)
2026-10-15 20:26:40 +08:00
awork c9384d947d fix: #3274 keep preflight dead-end cooldown warm across slow CI retries
The dead-end cooldown tests pin "cooldown replays the cached diagnosis" and
"cooldown spends zero upstream calls" on an immediate r1->r2 retry, but seeded
a 400ms window. On loaded CI runners (windows node22 jitter, #3279) the gap
between arming the marker and the retry exceeds 400ms, so the retry legitimately
re-walks preflight instead of replaying — drifting the local token estimate in
the fail-fast message and re-spending upstream calls, which breaks the
byte-equality / zero-calls assertions as a sporadic red shard.

Widen BILI_PREFLIGHT_DEAD_END_COOLDOWN_MS to 60s in the four affected files so
the within-cooldown path is deterministic regardless of runner speed; in
preflight-empty-summary convert the #726 expiry leg from a wall-clock sleep to a
direct marker `until` cool-down so it no longer depends on the window size.

A/B evidence: 400ms window + 800ms gap -> 2 calls spent, messages diverge (flake);
60s window + 800ms/5000ms gaps -> 0 calls, byte-identical replay.

Fixes #3274
2026-10-15 20:17:22 +08:00
ranxianglei 844af992e8 Merge pull request #3214 from ranxianglei/2026-10-15_fix-3199-overview-cold-scan
fix(web): stop /__bili dashboard cold scans from freezing the instance (#3199)
2026-10-15 19:53:39 +08:00
awork fbc0b1daf2 fix: #3266 require the active downsample pass in the image_full tool-injection gates 2026-10-15 18:48:56 +08:00
awork 961509afa2 fix: #3272 disarm CCR arming on the codex responses lane (unroutable acp_retrieve)
On the responses wire a codex host rejects bili-injected tools at its tool
router and records a synthetic "unsupported call" entry in its own resent
history. An armed CCR there declares acp_retrieve (unroutable by the host)
and placeholderizes oversized tool results the model can never retrieve back
(silent loss); every retrieve round-trip permanently forks client history
from ours (prefix-cache collapse). Same structural mechanism as image_full's
restore channel (#3266/#3270).

Gate the CCR arming stamp with !(protocol === "responses" && isCodexClient),
mirroring #3270's adjacent image_full gate. Disarmed -> no tool declaration,
no placeholder substitution; large tool results stay verbatim until regular
folding. Other lanes/wires unaffected; plugin-mode responses already excluded
via PLUGIN_CCR_WIRES. CCR is opt-in, so this only touches codex responses
users who explicitly enabled compress.ccr.

Test: tests/issue3272-ccr-codex-lane-gate.test.ts pins codex->disarmed /
non-codex->armed on the native responses wire.
2026-10-15 18:44:56 +08:00
awork 22dfa122e3 test: pin #3199 cold-scan behavior (shadow reconcile, bounded boot, legacy control)
- T1: shadow list = index baseline + tree delta — fresh row adopted with
  zero decodes; externally rewritten file decoded and wins; unrecorded file
  listed; ghost row dropped; live session overrides. Structural assert that
  decode count equals the delta count only (no full-corpus decode).
- T2: unified boot parses only the newest window before listen; survivors
  come from the savedAt-desc trim within the window (#404 contract kept);
  label aliases seeded synchronously from index rows; remainder scan
  completes post-boot and covers unrecorded labels.
- T3: legacy control — synchronous full parse, aliases complete immediately
  after boot (zero regression for non-unified installs).
2026-10-15 18:35:11 +08:00
awork 3a76715b2e fix(tests): make #841 fixture dir scan sidecar-aware (pre-existing ENOTDIR under unified storage)
Small in-passing fix found while testing #3199, its own labeled commit.
Pre-existing failure verified on pristine master with the node:sqlite
builtin engine: the #841 cold-load case assumed every top-level entry under
the sessions dir is a protocol directory and readdir'd each one — unified
storage puts index.db (+WAL files) at top level, so the snapshot scan died
with ENOTDIR. Guard the descent with isDirectory(); unrelated to the #3199
change itself.
2026-10-15 18:35:11 +08:00