Repository navigation
Open
Labels
Description
Problem
/upstream (weekly cron in .github/workflows/upstream-assessment.yml, code in src/lib/upstream/) gets relevance wrong in both directions and costs a person a lot of manual cleanup each run. Evidence from the last two sweeps:
- The finding issues it files are all noise. In the 2026-10-12 run, all 7 finding issues for v2.1.290–296 (feat: Hook change: Fixed some permission rules and safety checks not being applied to a tool call a... (from Claude Code v2.1.290) #1423, feat: Hook change: Security: Fixed PreToolUse hook approvals and auto mode bypassing the permission... (from Claude Code v2.1.292) #1426, feat: Hook change: Fixed variables a SessionStart hook writes to
CLAUDE_ENV_FILEnot reaching the... (from Claude Code v2.1.295) #1430, feat: New tool: Added anallow_largeoption to the Read tool so Claude can read a text file pa... (from Claude Code v2.1.296) #1432–fix: BREAKING: [Claude Tag] Fixed links to URLs that contain parentheses breaking in some of Cl... (from Claude Code v2.1.296) #1435) had no Sequant impact. The triage found 4 real items, and all 4 were in lines the classifier had put under Opportunities or No Action:onFailure: "block"→ fix(hooks): pre-tool guard fails open when the hook can't start, crashes, or times out — adopt onFailure: "block" (Claude Code 2.1.295) #1439, the agent-SDK gap → chore(deps): phase agents run the SDK-bundled Claude Code 2.1.289 — bump @anthropic-ai/claude-agent-sdk to ≥ 0.3.296 #1440,disableClaudeAiConnectors→ fix(mcp): phase agents receive the user's claude.ai connectors (Gmail, Docs) outside the #936 allowlist #1396, and the Haiku/Sonnet alias change → docs: model alias table — sonnet and haiku now resolve to 5.5 (Claude Code 2.1.296) #1441. The 2026-10-06 sweep went the same way: theverifycollision (fix(skills): Claude Code ≥2.1.286 tells Claude to run any project skill namedverifybefore every commit — Sequant's verify expects an issue number and posts to GitHub #1345) and the rm-analyzerbash -cfix (docs(security): raise the recommended Claude Code version to 2.1.288 — the native rm analyzer missedbash -cunder bypassPermissions until then #1346) were both filed as No Action. - Each run opens many issues. It files one assessment issue per release, one combined issue, and the finding issues. The 2026-10-12 run opened 27, and each one was closed by hand.
- The baseline moves only when someone merges the report PR. Report PR docs: Upstream assessment for v2.1.289 #1339 (v2.1.289) sat unmerged, so the 2026-10-12 run assessed v2.1.284–289 again and re-filed 12 issues (Upstream: Claude Code v2.1.284 Assessment #1410–Upstream: Claude Code v2.1.289 Assessment #1421) that had been triaged and closed on 2026-10-06.
- Dedupe ignores closed issues.
checkForDuplicate(src/lib/upstream/issues.ts:86) callssearchIssuesOrNullSync(src/lib/workflow/platforms/github.ts:637), which runsgh issue listwithout--state. That returns open issues only, so a finding that was triaged and closed never counts as a duplicate. - It tracks the wrong version for phase agents. Phase agents run the Claude Code bundled in
@anthropic-ai/claude-agent-sdk(src/lib/workflow/drivers/claude-code.ts), not the user's installed CLI. A changelog fix reaches phase runs only after an SDK bump (chore(deps): phase agents run the SDK-bundled Claude Code 2.1.289 — bump @anthropic-ai/claude-agent-sdk to ≥ 0.3.296 #1440), and the assessment doesn't say so.
What worked on 2026-10-13 was an agent reading every changelog line and grepping the code for evidence, defaulting to "no impact" unless it could cite a file:line.
Proposal
- One digest per run. Each run produces a single digest: the report PR, or one issue that lists every changelog line with its triage verdict. Stop auto-filing per-version assessment issues and finding issues. Real issues get filed only after a person reviews the digest.
- Code-grounded triage replaces the keyword classifier. One model pass per run classifies each line as relevant only with
file:lineevidence from this repo. Keywords may still rank lines, but must never decide that a line is dropped. - The baseline moves when triage completes. Either the workflow commits the baseline bump itself, or closing the digest moves it. An unmerged report PR must never cause the next run to re-assess releases.
- Dedupe checks closed issues too (
--state all), for any issue the pipeline still files. - The digest states the agent-SDK bundled CLI version from
package-lock.json. Any finding that affects phase agents names an SDK bump as its action.
Acceptance Criteria
- AC-1: A scheduled run over a multi-release range opens exactly one GitHub issue or PR and no per-release or per-finding issues. Evidence: a test of the run entry point with a mocked
ghthat asserts exactly one create call for a 3-release fixture, mutation-verified by restoring per-finding filing. - AC-2: Triage catches the known misses. With a fixture of the 4 lines named in this issue plus the v2.1.286
verifyline and the v2.1.288 rm-analyzerbash -cline, every one is classified relevant. With the 7 changelog lines behind feat: Hook change: Fixed some permission rules and safety checks not being applied to a tool call a... (from Claude Code v2.1.290) #1423, feat: Hook change: Security: Fixed PreToolUse hook approvals and auto mode bypassing the permission... (from Claude Code v2.1.292) #1426, feat: Hook change: Fixed variables a SessionStart hook writes toCLAUDE_ENV_FILEnot reaching the... (from Claude Code v2.1.295) #1430 and feat: New tool: Added anallow_largeoption to the Read tool so Claude can read a text file pa... (from Claude Code v2.1.296) #1432–fix: BREAKING: [Claude Tag] Fixed links to URLs that contain parentheses breaking in some of Cl... (from Claude Code v2.1.296) #1435, at most 1 is. Evidence: an eval script run against that fixture, with its output pasted in the PR body. This AC is non-deterministic, so it is measured, not CI-gated. - AC-3: Every line the triage marks relevant cites at least one
file:linethat exists in the repo. Evidence: a test that validates the citations in a triage output fixture and fails when one path does not exist. - AC-4: The baseline advances without merging a report PR, by whichever mechanism /spec picks. A run that starts after an unmerged report does not re-assess releases that report already covered. Evidence: a test that seeds an unmerged-report state and asserts the assessed range, mutation-verified by removing the advance step.
- AC-5: Duplicate detection matches closed issues. Evidence: a test in which the only matching issue is closed and the result is
isDuplicate: true, mutation-verified by dropping--state all. - AC-6: The digest shows the agent-SDK version from
package-lock.jsonand the Claude Code version it bundles. Evidence: a report-rendering test that asserts the line appears.
Notes
- This replaces fix(skills): Claude Code ≥2.1.286 tells Claude to run any project skill named
verifybefore every commit — Sequant's verify expects an issue number and posts to GitHub #1345 AC-5 (a keyword rule for shipped skill names). AC-2 covers that case with theverifyline. - The classifier lives in
src/lib/upstream/and the workflow, but changing the/upstreamskill (.claude/skills/upstream/SKILL.md) is a skill edit. The merge waits for the plugin freeze to lift, so an SDK/TS-only split could land first. - Cost: one model pass per week, about what the 3 triage agents used on 2026-10-13 (~230k subagent tokens across ~380 lines).
Activity
admarble commentedon Oct 14, 2026
The manual procedure this issue automates is written up in
docs/internal/upstream-triage.md(PR to follow): bundled-SDK check, the per-release agent prompt, and the close/file/merge steps. Step 2 (code-grounded triage) should absorb that prompt rather than keep a second copy. #1345 AC-5 is now struck in favour of this issue.docs(upstream): merge the report PR after triage; triage procedure an…