fix: launch identity false-positive + resolver race (iss-31) - #43
Merged
Conversation
Two of iss-31's three named launch-dogfood instances, detector-first
(the identity FP verified against a live 'abcd launch --dry-run': the
scan's 2 /dev/null hard-fails drop to 0):
- Identity scanner: a machine username that equals a system directory
(HomeUser=dev) was flagged as a leak inside '/dev/null', hard-failing
the launch scan. isSystemPathSegment suppresses a local-username match
only when it is the top segment of an absolute system path; genuine
leaks (nested under a home root, or bare) are still caught. Scoped to
local_username; home_path_self remains the backstop for a
home-dir-named user (security-reviewed PASS).
- Launch bundle: globRegexpCache was an unsynchronised package-level map.
A sync.RWMutex guards it; TestGlobToRegexpConcurrent fails -race
without it. Benign double-compile on a concurrent miss.
The third named instance ('payload omits skills/') is stale: no skills/
dir exists (reclassified to commands/abcd/, shipped via the commands
include). Resolves iss-31; the aggregate dry-run gate's remaining
blockers are filed as iss-77 (payload agents/hooks completeness) and
iss-78 (version-location.json absent).
Assisted-by: Claude:claude-opus-4-8
Filed during iss-31: the launch payload omits agents/ and hooks/ (iss-77, design-shaped — public includes set is a maintainer call) and the aggregate dry-run gate is blocked by an absent version-location.json (iss-78). Both are needed before a full 'launch --dry-run green' dogfood gate can be armed, and are out of iss-31's three-instance scope. Assisted-by: Claude:claude-opus-4-8
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.
Resolves ledger issue iss-31
launch-dogfood-gateby addressing all three named acceptance-corpus instances, detector-first.The three instances
/dev/null(local-username false positive)skills/skills/dir; reclassified tocommands/abcd/(2026-07-11), ships via thecommandsincludeglobRegexpCacheunsynchronised package-level map (data race)The fixes
internal/adapter/scanner/identity.go): when the machine username equals a system directory name (e.g. a user calleddev), the local-username matcher flaggeddevinside/dev/null, hard-failing the launch scan.isSystemPathSegmentsuppresses a local-username match only when the matched text is a well-known system-dir name and the top segment of an absolute path (/dev/…). Genuine leaks — nested under a home root (/Users/dev/…,/home/dev/…), bare (dev), ordev@host— are still caught, and the suppression is scoped tolocal_usernameonly (home_path_selfremains the backstop for a home-dir-named user).internal/core/launch/bundle.go): the compiled-glob cache is now guarded by async.RWMutex(read lock on lookup, write lock on store). A concurrent miss may compile a pattern twice — benign.Detector-first evidence
abcd launch --dry-run: the scan's/dev/nullhard-fails drop 2 → 0.TestIdentityLocalUsernameSystemPathSuppressed— asserts/dev/nullis not flagged, and that/home/dev/dataand a baredevstill are (false-negative controls). Watched fail before the fix (Matched:dev), passes after.TestGlobToRegexpConcurrent— 64 goroutines with distinct patterns force concurrent cache writes; fails-racewithout the mutex (verified by reverting), passes with it.make preflightclean (build, gofmt, vet, test,-race).Review
/dev/null,2>/dev/null,/Users/dev/x,/usr/dev/null, start/end-of-line; RWMutex race-free; sharedguardsslice is read-only.root); no false negative that ships a real leak./root/secretstill hard-fails viahome_path_self; secrets are matched by a separate pattern set, unaffected.Scope split (aggregate gate follow-ups)
Even with iss-31's three instances resolved,
abcd launch --dry-runis not fully green on this repo — two out-of-scope blockers, filed separately:agents/andhooks/(auto-discovered plugin surfaces); deciding the public includes set is a maintainer/design call..abcd/config/version-location.jsonis absent (the un-self-installed source-repo state), so lockstep + retention refuse.Branches from
main(independent of #41/#42). Do not merge / no auto-merge — maintainer mergesfix:PRs.Assisted-by: Claude:claude-opus-4-8