Repository navigation
Closed
Description
Observed (2026-09-26, bringing the upstream workflow up after #1153)
- A missing label crashes the run after it has already filed issues. Dispatch run 36210265921 filed assessment issue Upstream: Claude Code v2.1.283 Assessment #1170, then died on the first finding with
gh issue create failed: could not add label: 'needs-triage' not found(the labels come fromsrc/lib/upstream/report.ts:302-311). Four earlier weekly runs failed the same way onassessment. - Assessment issues never dedupe.
createAssessmentIssue(src/lib/upstream/issues.ts:281) files unconditionally, andisAlreadyAssessedchecks the report file, which only reachesmainwhen the report PR merges. A re-run therefore files a secondUpstream: Claude Code <v> Assessment(Upstream: Claude Code v2.1.283 Assessment #1170 had to be closed by hand). --sincesilently caps at 50.getReleasesSince(src/lib/upstream/assessment.ts:123) walkslistReleases()(default limit 50) until it meets the baseline tag. When the baseline is older than the 50 newest releases (it wasv2.1.42against a latest ofv2.1.283), it never meets it and returns all 50. The next weekly run would have filed 50+ issues.- Bug fixes are filed as deprecations. The
deprecationpattern (src/lib/upstream/relevance.ts:19) matches anyremov(e|ed|ing), and deprecation outranks everything but breaking (:99). Four of the six v2.1.283 findings were release-note fixes that mention removing something: chore: Deprecated: Fixedclaude plugin marketplace removenot saying which installed plugins it u... (from Claude Code v2.1.283) #1173, chore: Deprecated: Fixedclaude plugin uninstallremoving the other of two installed plugins whos... (from Claude Code v2.1.283) #1174, chore: Deprecated: Fixedclaude mcp add,add-json, andremovereporting success when the user... (from Claude Code v2.1.283) #1175, chore: Deprecated: Windows: Fixed the PowerShell tool lettingcmd /c rd,rmdir,delor `erase... (from Claude Code v2.1.283) #1176 (chore: Deprecated: Fixed …).
- Tier: mechanical (strong-model QA)
Acceptance criteria
- AC-1: before filing anything, a non-dry run checks that every label the upstream code can apply exists (
upstream,assessment,needs-triage,priority:high,bug,enhancement) and exits non-zero naming the missing ones, having created no issue — Evidence:npx vitest run src/lib/upstream/__tests__/issues.test.ts -t "labels"passes, mutation-verified (delete the pre-flight call; the case fails) - AC-2:
createAssessmentIssuereuses an open issue whose title is exactlyUpstream: Claude Code <version> Assessmentinstead of filing a second — Evidence:npx vitest run src/lib/upstream/__tests__/issues.test.ts -t "existing assessment"passes, mutation-verified (bypass the lookup; the case fails) - AC-3:
getReleasesSincethrows a named error (the baseline tag and how many releases were searched) when the baseline tag is not among the fetched releases, instead of returning all of them — Evidence:npx vitest run src/lib/upstream/__tests__/assessment.test.ts -t "baseline not found"passes, mutation-verified (restore the silent fall-through; the case fails) - AC-4: a release note that fixes something (begins
Fixedafter an optionalPlatform:prefix, e.g.Windows: Fixed …) and mentions removing something is not categorizeddeprecation; genuine deprecations (deprecat…,no longer support…,removed support for …) still are — Evidence:npx vitest run src/lib/upstream/__tests__/relevance.test.ts -t "1179"passes, with the four v2.1.283 notes below as fixtures, mutation-verified (restore the bareremov(e|ed|ing)alternative; the case fails)
Fixtures for AC-4 (verbatim from .sequant/upstream/v2.1.283.md). Each must not be deprecation:
Fixed \claude plugin marketplace remove` not saying which installed plugins it uninstalled with the marketplace; it now lists them`Fixed \claude plugin uninstall` removing the other of two installed plugins whose ids differ only in case, with its options and secrets, when the one named had no `enabledPlugins` entry at that scope`Fixed \claude mcp add`, `add-json`, and `remove` reporting success when the user or local config file could not be written, for example inside a sandbox`Windows: Fixed the PowerShell tool letting \cmd /c rd`, `rmdir`, `del` or `erase` delete drive roots, the home folder and other folders that `Remove-Item` refuses`
Non-Goals
- Re-categorizing or closing the already-filed feat: New tool: Added MCP tool, WebFetch and WebSearch outputs to the
tool.outputOpenTelemetr... (from Claude Code v2.1.283) #1172–feat: Hook change: Self-hosted runner: Changed lifecycle hooks' git to skip a repository's Git LFS ... (from Claude Code v2.1.283) #1177 (the owner triages those by hand). - The
newToolpattern (feat: New tool: Added MCP tool, WebFetch and WebSearch outputs to thetool.outputOpenTelemetr... (from Claude Code v2.1.283) #1172, "Added MCP tool … outputs", is arguably not a new tool either). File it separately if it recurs. - Changing the workflow YAML, the App token route (fix(ci): upstream-assessment pushes its report straight to main, which the #1109 ruleset rejects #1153), or the weekly cron.
- Creating labels from code. The check reports what's missing; a human creates the labels.
Activity
admarble commentedon Sep 26, 2026
Runner context: these rules apply to the spec, exec AND qa phases.
<!-- SEQUANT_MUTATION: {...} -->marker and aMutation-verified:line in the PR body, andfailedTestmust start with the test file path (src/lib/upstream/__tests__/<file>.test.ts > …). The-tfilters in the Evidence commands must match the test names you write.createAssessmentIssue. Mockgh/the provider in tests; no network.npm test; run the four named test files. The runner runs the suite once. exec phase: commit WIP before long commands, run the suite at most once in the foreground with atimeout, and neverrun_in_background.[Unreleased]line. Stop at the PR.admarble commentedon Sep 26, 2026
Complexity: Standard (4 ACs, 1 directory:
src/lib/upstream/)AC Quality Check
All four ACs are single-line, name an
Evidence:command, and carry a mutation clause. Nothing vague. One note: the-tfilters (labels,existing assessment,baseline not found,1179) are substring matches, so the test names/describe blocks must contain those exact strings.Scope Assessment
Non-Goals: present (recategorizing #1172–#1177,
newToolpattern, workflow YAML/cron, creating labels from code).Verdict: ✅ SCOPE_OK
Acceptance Criteria
AC-1: Label pre-flight before any issue is filed
Verification: Unit Test (
issues.test.ts -t "labels", provider mocked, no network)Scenario: Given
needs-triageis absent in the repo → When a non-drycreateAssessmentIssueruns → Then it throws/exits non-zero namingneeds-triage, andcreateIssueWithBodyFileSyncwas never called.Assumptions:
GitHubProviderhas no label-listing method today; addlistLabelsSync(repo)(gh label list --json name --limit 200).AC-2: Reuse an open assessment issue with the same title
Verification: Unit Test (
-t "existing assessment")Scenario: Given an open issue titled exactly
Upstream: Claude Code v2.1.283 Assessment→ WhencreateAssessmentIssueruns with that title → Then it returns that issue's number and creates nothing.Assumptions:
searchIssuesSyncalready lists open issues only (gh issue listdefault), which is the "open" requirement.AC-3:
getReleasesSincefails loudly past the windowVerification: Unit Test (
assessment.test.ts -t "baseline not found")Scenario: Given 50 fetched releases without the baseline tag → When
getReleasesSince("v2.1.42")runs → Then it throws namingv2.1.42and50.Assumptions: the existing case "returns all versions if target not found" asserts the old behavior and must be rewritten, not deleted.
AC-4: Fix notes are not deprecations
Verification: Unit Test (
relevance.test.ts -t "1179", four v2.1.283 notes as verbatim fixtures)Scenario: Given each fixture note → When categorized → Then category is not
deprecation;Removed support for X,Deprecated …,no longer supports …still are.Implementation Plan
Phase 1: Relevance (AC-4), independent
src/lib/upstream/relevance.ts:19: split the pattern sodeprecat…andno longer supportmatch anywhere, while theremov(e|ed|ing)alternative only matches when the note does not begin with an optionalPlatform:prefix plusFixed, e.g./\b(deprecat(e|ed|ing|ion)|no longer support)|^(?!(?:[A-Za-z]+:\s*)?Fixed\b).*\bremov(e|ed|ing)\b/i. Keeps theDetectionPatternsshape (matchPatternsuntouched).relevance.test.ts: add a1179describe with the four fixtures plus positive controls.Phase 2: Window (AC-3), independent
assessment.ts:123: if the baseline is never met andreleases.length > 0, throwBaseline tag <x> not found among the <N> most recent releases searched. Empty list still returns[].baseline not found.Phase 3: Issues (AC-1, AC-2), same file so sequential
github.ts: addlistLabelsSync(repo).issues.ts: exportREQUIRED_LABELS(the six the upstream code can apply; reference fromreport.ts:302-311so they cannot drift) andassertLabelsExist(owner, repo), throwing an error that lists the missing ones. Call it first in non-drycreateAssessmentIssue. That is before any issue in bothassessVersionandassessSince, so nothing is filed. Confirm the throw reaches a non-zero exit in the CLI entry (therunUpstreamcaller).createAssessmentIssue: after the pre-flight, look up open issues with labelsupstream,assessmentand an exact title match; return that number if found.issues.test.ts; mocks needlistLabelsSyncin the provider mock and a default returning all six labels inbeforeEach(existing tests would otherwise break).[Unreleased]line.Design Review
issues.tsowns gh interaction and dedupe;assessment.tsowns release windowing;relevance.tsowns categorization.createAssessmentIssuerather than a new orchestrator step, since it is the first creator. Rejected: creating missing labels (Non-Goal); a separate call site inrunUpstream(not covered by theissues.test.tsgate).validateRepoParams.removentirely?" It would stop flagging real removals like "Removed the /foo command"; the anchored negative lookahead only excludes fix notes.Feature Quality Planning
All standard checks pass. Notable items:
issues.test.ts,assessment.test.ts) construct the provider as a hand-rolled class, so a new provider method must be added there or existing tests fail.SEQUANT_MUTATIONmarker withfailedTeststarting with the test file path, plusMutation-verified:lines in the PR body.Open Questions
getReleasesSince—listReleasesswallowsgherrors and returns[], so an API failure still reads as "no new versions". Recommendation: leave as is (out of AC); file a follow-up. Impact: a gh outage looks like a quiet week.Recommended Workflow
Phases: testgen → exec → qa
Quality Loop: disabled
Reasoning: AC-1..4 declare unit-test evidence, so testgen stubs them first; small mechanical change in one directory. Per issue runner notes, qa runs only the four named test files, not the full suite.
Label Review
Current: bug, upstream
Recommended: bug, upstream, planned
Quality Loop: Won't auto-enable (SCOPE_OK)
admarble commentedon Sep 26, 2026
QA Verdict: AC_MET_BUT_NOT_A_PLUS
Gaps:
listLabelsSync(github.ts:559-578) is the only new function ingithub.tsand has no direct unit test, while its immediate siblingsearchIssuesSyncdoes — including a failure-path case (github.test.ts:260-303). Everything downstream mocks it, so thegh label listargv, the--limit 200ceiling, the JSON parse, and thestatus !== 0 → nullbranch are all unexercised.searchIssuesSyncreturns[]both when the search finds nothing and whenghfails or rate-limits (github.ts:545,:551). AC-2's dedupe therefore degrades silently into filing a duplicate — the exact bug it was written to prevent. The correct pattern (nullsentinel) is present in this very diff onlistLabelsSyncbut wasn't applied to the load-bearing lookup.Suggestions:
listLabelsSynca direct test mirroringsearchIssuesSync's, including thestatus !== 0path.searchIssuesSyncOrNull(or reuse thenullconvention) so the dedupe can fail loudly, consistent with AC-1's own philosophy of failing before filing.fix(#1179): assessment dedupe fails loudly when the lookup fails; bra…
fix(#1179): upstream pre-flight labels, dedupe, baseline window, fix-…
admarble commentedon Sep 26, 2026
Runner verification (PR #1180): QA returned AC_MET_BUT_NOT_A_PLUS. Both of its fix-now gaps are fixed in
d894b436: the duplicate check now fails loudly when theghlookup fails (newsearchIssuesOrNullSync), andlistLabelsSynchas direct tests. The bracket-prefix note is also folded in ([Product] Fixed …). Each fix is mutation-verified (see the PR body). Fullnpm run build && npm test: 341 files and 8449 tests passed. CI atd894b436:testandcanarysuccess.