Skip to content

fix(#1186): file a finding issue only when it touches something sequant uses; refresh the dependency map - #1187

Merged
admarble merged 2 commits into
mainfrom
fix/1186-upstream-relevance
Sep 27, 2026
Merged

admarble merged 2 commits into
mainfrom
fix/1186-upstream-relevance

Conversation

@admarble

@admarble admarble commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1186.

What changes

Issue filing is gated on relevance. assessVersion now calls selectIssueWorthy (src/lib/upstream/relevance.ts). A finding gets its own issue when:

  • it is breaking (always, whatever it names), or
  • it is a deprecation, new tool or hook change and it is relevant. Relevant means one of two things:
    • it names, case-sensitively, a tool (tools.core/tools.optional), a hook event in hooks.used, a dependency-map key, or an entry in the new optional commands list;
    • an affected file exists. A glob counts when the directory before its first * exists.

Generic keywords (hook, MCP, tool, plugin, settings…) still drive categorization and the report sections. They no longer earn an issue. Anything not filed is still listed in the assessment issue, as before.

Dependency map refreshed (.sequant/upstream/baseline.json and getDefaultBaseline()):

  • The generic keys are dropped (hook, MCP, permission, settings, config, skill, agent, subagent, background, parallel). Any of them pointing at an existing file would make the "affected file exists" clause fire on nearly every note.
  • The four missing paths are replaced. The map now keys PreToolUse/PostToolUse/SessionEnd → templates/hooks/*.sh, hooks/hooks.json and templates/settings.json, plus Task.
  • hooks.used now lists the three events the plugin's hooks/hooks.json wires. It said only PreToolUse before, and hooks.files pointed at the nonexistent src/hooks/pre-tool-hook.ts.
  • Affected files now come from identifiers the change names verbatim. A lowercase "task" no longer pulls in the Task mapping.

Collateral:

  • The summary table reads "Issue if it touches sequant" for new tools and hook changes, where it used to say "Issues created".
  • /upstream SKILL.md is updated in all three copies: the filing rule, the baseline example and the sample output (lint:skill-sync 0 diverged).

⚠️ Policy line to read: new outOfScope entry

"OpenTelemetry - sequant emits and consumes no OpenTelemetry output"

This is the one non-mechanical decision here. #1172 names WebFetch/WebSearch, and exec, loop and upstream all use WebFetch. Under AC-1's own "names a tool sequant uses" rule, #1172 would be relevant. The note is about OTEL span content, and the WebFetch mention is incidental. No deterministic identifier rule separates those. So the entry encodes #1186's own triage reason ("sequant emits none") through the existing outOfScope mechanism. The other route would have been to drop tools.optional from relevance, but that would silence a real WebFetch deprecation. Remove the line if you'd rather those notes still file.

Fixture coverage, stated plainly

Post-#1179, four of the six v2.1.283 notes (#1173–#1176) categorize as opportunity and never reach the filter under either rule. With the OTEL entry, #1172 becomes no-action. So #1177 is the only fixture that tells the old filter from the new one. The mutation below fails on it, and a separate "lowercase words" case fails too. The AC-1 test also asserts that at least one fixture is non-opportunity actionable, so it can't pass vacuously.

Verification

  • npx vitest run src/lib/upstream: 163 passed
  • npx tsc --noEmit, npm run lint, npm run lint:skill-sync (44 synced, 0 diverged): clean
  • npm test (full suite): 8458 passed, 1 failed: src/lib/workflow/mutation-marker.property.test.ts > … round-trips. This failure predates the PR. It reproduces on origin/main with FC_SEED=205751990 (counterexample noise ~~~: the generator strips backticks but not tilde fences). The file is untouched here.

Mutation-verified: AC-1 — restored the category-only filter in selectIssueWorthy (f.category !== "no-action" && f.category !== "opportunity"); src/lib/upstream/__tests__/assessment.test.ts > issue filing relevance (#1186) > relevance: the six v2.1.283 notes behind #1172–#1177 file no issue failed (along with relevance: lowercase words don't match tool names); restored.

Mutation-verified: AC-3 — appended the missing src/hooks/pre-tool-hook.ts to dependencyMap.PreToolUse in baseline.json; src/lib/upstream/__tests__/assessment.test.ts > issue filing relevance (#1186) > dependency map paths exist failed (received ["src/hooks/pre-tool-hook.ts"]); restored.

AC-2: breaking always gets an issue, even when it names nothing sequant uses (assessment.test.ts). AC-4: generateAssessmentReport: findings without their own issue (#1186) (report.test.ts) asserts that a hook change with no issue number appears under Actionable.

🤖 Generated with Claude Code

…nt uses; refresh the dependency map

Breaking changes always get an issue. Other actionable findings need a case-sensitive mention of a tool, hook event, dependency-map key or documented claude command, or an existing affected path. The dependency map drops generic keys and the four missing paths; OpenTelemetry joins outOfScope.

Entire-Checkpoint: b800e885dc73
@admarble
admarble merged commit d16421f into main Sep 27, 2026
10 checks passed
@admarble
admarble deleted the fix/1186-upstream-relevance branch September 27, 2026 16:36
admarble added a commit that referenced this pull request Sep 28, 2026
…1190)

The fix merged in #1187 changed the shipped /upstream skill and src/lib/upstream but had no CHANGELOG entry.

Entire-Checkpoint: 5df8587d9fb4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(upstream): file a finding issue only when the change touches something sequant uses; refresh the stale dependency map

1 participant