Repository navigation
[PR] fix(diagnostics): register the attribution topic the banner already reports to - #7054
Conversation
…eports to The takeover-attribution banner (src/web/client.ts, #3581/#3651) ships "copy diagnostics / report on GitHub" buttons wired to topic=attribution, but that topic was never registered in the diagnostics TOPICS map — the blob fell back to the generic title and printed "topic: attribution (no topic-specific section registered)", so the report carried none of the attribution evidence (which agent degraded, state, refusals, error, endpoint) a maintainer needs to adjudicate a takeover-broken episode. Register the topic with a section that renders the latest per-agent attribution report (attributionStatusWire): state/refusals/since per agent, the error text (threw episodes) and the masked endpoint, plus the banner policy + remedy note. The host-supplied error/endpoint bytes pass the sink-level redactForPublish like every other section, so no per-field scrubbing is needed upstream. Regression test pins the registered topic (specific title + section, not the generic fallback), the empty-map note, the per-agent line shape, and the publish-boundary redaction of the error text. Closes #7053
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.10628-pr.7054.57bea2fThis exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr7054.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) Reviewed PR #7054 against current master. The fix is correct, the regression test has real teeth, and the diff is clean. Verified
Regression review (existing behaviors in the touched path)
Auto-merge gate (§7.4): all green — single-module, regression test present, no config/wire/kernel touch, pure 结构化八问
合并判定: 可合。CI 测试分片仍在跑(static-gates + mysql-contract 已绿),转绿后等 owner 合并(合并仅人工)。 |
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1222-master.30fb448 # this exact build
npm install -g billion-context@master # always the newest merged build
|
Master advanced 33 commits (v0.1.216 release, #7054 attribution diagnostics, #6592 dsh-go-client docs, #6922 responses section joiner, #4313 timestamp-rendering default flip, …). Overlap on 2 of the PR's 6 files: relay.ts auto-merged cleanly (PR's armFailureShrink sidePassthrough gate at the function top vs master's createHandoffReply signature change — disjoint regions, both intents kept). The one conflict, tests/issue2929-codex-fold-double-miss.test.ts, resolved by taking master's version: master rewrote the probe to arm SCHEDULE-INDEPENDENTLY (first nudge-carrying request with >=11 refs), which supersedes this branch's anchor recalibration (0bea490, 6/7 -> 7/8) — a hardcoded index anchor broke on every nudge-gate schedule shift and the schedule-independent arming is the durable fix. Verified locally: 2929 + issue4974 + side-lane-invariants = 21/21 pass; typecheck clean.
What
The takeover-attribution banner (added in #3581, report buttons in #3651) ships "copy diagnostics / report on GitHub" buttons wired to
topic=attribution. Butattributionwas never registered in the diagnosticsTOPICSmap, sobuildDiagnostics("attribution")fell back to the generic title and printedtopic: attribution (no topic-specific section registered). The report a user copies into a GitHub issue therefore carried none of the attribution evidence a maintainer needs to adjudicate a takeover-broken episode — which agent degraded, its state, refusal count, the error text, and the endpoint.This is exactly what the reporter's issue shows: the blob has the generic title and the "no topic-specific section registered" line, with no
--- takeover attribution ---section.Fix
Register the
attributiontopic insrc/web/diagnostics.tswith a section that renders the latest per-agent attribution report fromattributionStatusWire()(src/server/attribution-status.ts):state/refusals/sinceThe host-supplied error/endpoint bytes pass the sink-level
redactForPublishlike every other section, so no per-field scrubbing is needed upstream.Also updated the stale facility header comment to list all four consumers.
Tests
New
tests/web-diagnostics-attribution-topic.test.tspins:Targeted suites green: the new test +
web-diagnostics-enrichment+issue3581-attribution-health.npm run typecheckandnpm run buildpass.Config surface
None — no config field, env var, or CLI flag added.
Model-facing text
None — the diagnostics blob is copied into a GitHub issue by a human; the model never sees it.
Closes #7053