Flag tasks with secret findings in Hub sync - #340
Merged
mando merged 2 commits intoAug 18, 2026
Conversation
mando
added a commit
that referenced
this pull request
Aug 17, 2026
Review of #340 found the flag couldn't reach the Hub for the sessions it exists to serve. computeSessionDigest watched none of what the scan drain writes, so a back-catalogue session whose only change was "we just found a credential in it" kept its old digest and sync skipped it. Worse, a re-index cascaded the findings away and uploaded flagged:false, and the drain re-finding the same credential changed nothing, so the flag un-set permanently. The digest now folds in which tasks a session's findings flag, per-task so re-interpretation moving a finding between tasks still re-syncs. The flag ignores secret_scan_dismissed, alone among readers of that table. That is intended, not an oversight, so it now says so where someone would go to "fix" it: dismissal silences one user's banner, while the flag is the org's record that a piece of work touched a credential, and a signal that depends on who clicked Dismiss is not one an org can reason about. The digest ignores dismissal for the same reason, so a dismissal causes no pointless re-upload. Sync opens the store read-only and never migrates it, so the flag query threw "no such table: resolved_secret_findings" on a pre-v24 store, printing a SQLite error every watch interval instead of reaching the Hub's 422 and its re-index guidance. Probe for the table, and report no flags when it's absent. Four surfaces still promised findings never cross the wire (database-schema.md, the findings DDL comment, the store contract, CLAUDE.md twice). They now say what is actually true: no finding row is uploaded, one derived boolean is.
Review of #340 found the flag couldn't reach the Hub for the sessions it exists to serve. computeSessionDigest watched none of what the scan drain writes, so a back-catalogue session whose only change was "we just found a credential in it" kept its old digest and sync skipped it. Worse, a re-index cascaded the findings away and uploaded flagged:false, and the drain re-finding the same credential changed nothing, so the flag un-set permanently. The digest now folds in which tasks a session's findings flag, per-task so re-interpretation moving a finding between tasks still re-syncs. The flag ignores secret_scan_dismissed, alone among readers of that table. That is intended, not an oversight, so it now says so where someone would go to "fix" it: dismissal silences one user's banner, while the flag is the org's record that a piece of work touched a credential, and a signal that depends on who clicked Dismiss is not one an org can reason about. The digest ignores dismissal for the same reason, so a dismissal causes no pointless re-upload. Sync opens the store read-only and never migrates it, so the flag query threw "no such table: resolved_secret_findings" on a pre-v24 store, printing a SQLite error every watch interval instead of reaching the Hub's 422 and its re-index guidance. Probe for the table, and report no flags when it's absent. Four surfaces still promised findings never cross the wire (database-schema.md, the findings DDL comment, the store contract, CLAUDE.md twice). They now say what is actually true: no finding row is uploaded, one derived boolean is.
mando
force-pushed
the
mando/task-flags-to-hub
branch
from
August 18, 2026 20:50
8ff24e9 to
2bbfbc6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
bun testbun run typecheckCloses the task flagging follow-up for the secret scanning work.