Skip to content

fix: launch identity false-positive + resolver race (iss-31) - #43

Merged
REPPL merged 2 commits into
mainfrom
fix/iss-31-launch-dogfood-gate
Jul 12, 2026
Merged

fix: launch identity false-positive + resolver race (iss-31)#43
REPPL merged 2 commits into
mainfrom
fix/iss-31-launch-dogfood-gate

Conversation

@REPPL

@REPPL REPPL commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Resolves ledger issue iss-31 launch-dogfood-gate by addressing all three named acceptance-corpus instances, detector-first.

The three instances

# Instance Disposition
1 Identity scanner hard-fails on /dev/null (local-username false positive) Fixed
2 Launch payload omits skills/ Stale — no skills/ dir; reclassified to commands/abcd/ (2026-07-11), ships via the commands include
3 globRegexpCache unsynchronised package-level map (data race) Fixed

The fixes

  • Identity false positive (internal/adapter/scanner/identity.go): when the machine username equals a system directory name (e.g. a user called dev), the local-username matcher flagged dev inside /dev/null, hard-failing the launch scan. isSystemPathSegment suppresses 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), or dev@host — are still caught, and the suppression is scoped to local_username only (home_path_self remains the backstop for a home-dir-named user).
  • Resolver race (internal/core/launch/bundle.go): the compiled-glob cache is now guarded by a sync.RWMutex (read lock on lookup, write lock on store). A concurrent miss may compile a pattern twice — benign.

Detector-first evidence

  • The identity FP was proven against a live abcd launch --dry-run: the scan's /dev/null hard-fails drop 2 → 0.
  • TestIdentityLocalUsernameSystemPathSuppressed — asserts /dev/null is not flagged, and that /home/dev/data and a bare dev still are (false-negative controls). Watched fail before the fix (Matched:dev), passes after.
  • TestGlobToRegexpConcurrent — 64 goroutines with distinct patterns force concurrent cache writes; fails -race without the mutex (verified by reverting), passes with it.
  • make preflight clean (build, gofmt, vet, test, -race).

Review

  • Correctness (ruthless-reviewer): PROMOTE — boundary logic verified for /dev/null, 2>/dev/null, /Users/dev/x, /usr/dev/null, start/end-of-line; RWMutex race-free; shared guards slice is read-only.
  • Security (security-reviewer): PASS — attacked the suppression with the machine user set to each dangerous system-dir name (incl. root); no false negative that ships a real leak. /root/secret still hard-fails via home_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-run is not fully green on this repo — two out-of-scope blockers, filed separately:

  • iss-77 — the payload also omits agents/ and hooks/ (auto-discovered plugin surfaces); deciding the public includes set is a maintainer/design call.
  • iss-78.abcd/config/version-location.json is 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 merges fix: PRs.

Assisted-by: Claude:claude-opus-4-8

REPPL added 2 commits July 12, 2026 17:30
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
@REPPL
REPPL merged commit 32b6aec into main Jul 12, 2026
12 checks passed
@REPPL
REPPL deleted the fix/iss-31-launch-dogfood-gate branch July 12, 2026 20:11
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.

1 participant