test(bundle): drive /label-sync's missing-number guard and already-in-sync report through dist/index.js (src/issueComment/labelSync.ts:20-21,32,35) #621
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 345 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.350
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #621"
general
weight: 0.35
jeefy
Test Improvement
Two test files under
__tests__/bundle/; nothing undersrc/,dist/, docs or config.__tests__/bundle/missingNumberGuards.test.ts— one matrix row:/label-syncon a comment without an issue number fails naming the guard (src/issueComment/labelSync.ts:20-21). It was the only slash command missing from the 17-row matrix.__tests__/bundle/labelSyncCommandInSync.test.ts— a collaborator's/label-syncagainst a repository the job already brought into line: the comment is exactlylabel-sync: created 0, updated 0, unchanged N.with neitherCreated:norUpdated:line (labelSync.ts:32,35false arms), stdout reportscreated 0 [], updated 0 [], unchanged N, failed 0, and nothing is written to the labels API. The repository is seeded from thePOST /labelsbodies of a first sync run through the same bundle, so the test holds no copy of the built-in label catalog that could drift from the bundle's.Why. Every bundle
/label-syncscenario so far starts from a repository missing labels, so the comment always carries aCreated:line; the report a maintainer sees when the job has nothing to do was never produced end to end. Unit coverage of the file is 100 %, the bundle run hadDA:21,0and zero-countBRDArecords for lines 20, 32 and 35 (CI artifactcoverage-e2e-96433268…, run 40928440920).Files / cluster claimed —
src/issueComment/labelSync.ts's end-to-end coverage only;__tests__/bundle/missingNumberGuards.test.tsand the new file. Disjoint from thecronJobs/labelSync.tssync-algorithm scenarios (labelSyncCatalog,labelSyncFailureArms,labelSyncNullDescription,labelSyncUnprefixedAllowlist) and from everything else in flight.Testing
At 36aecfa (rebased onto main@4f97e30, after #611 and #619):
npx vitest run __tests__/bundle/labelSyncCommandInSync.test.ts __tests__/bundle/missingNumberGuards.test.ts— 2 files, 20 passednpm run test:coverage:e2e(at 9643326, before the rebase) — 92 files, 550 passed; branches 1702/1714 → 1705/1714, lines 2489/2494 → 2490/2494;src/issueComment/labelSync.tsleaves the uncovered table, exit 0npx eslinton both files andnpm run typecheck— cleandist/rebuilt viatsc && ncc build --no-cache:issueNumber === undefinedmade unreachable → the matrix row fails (not a collaboratordebug line, exit 0 instead of the guard);result.created.length > 0→>= 0→ the in-sync test fails on the comment body (Created:line appears)Related Issue
Closes #620 — both boxes of the finding are in this PR.
---
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88