Skip to content

fix(e2e): create Claude probe state with private permissions - #1146

Merged
777genius merged 1 commit into
mainfrom
fix/e2e-claude-private-child-creation-20261128
Nov 28, 2026
Merged

777genius merged 1 commit into
mainfrom
fix/e2e-claude-private-child-creation-20261128

Conversation

@777genius

@777genius 777genius commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Problem

The genuine four-plugin Claude fixture in Marketing job 140866391686 failed after native cleanup created a new passive temporary file with mode 0644. The custody reader correctly requires 0600. The failure was in the preflight fixture (76 passed, one error); that job did not reach the Marketing lifecycle.

The existing bounded process probe inherits the parent's creation mask. Its core-dump resource limit does not provide private file creation.

Change

Add an optional, validated per-child umask to the existing probe, passed through Python's POSIX Popen option. The default omits the option and preserves inherited behavior.

Only the genuine Claude fixture and the existing, identity-checked Claude removal-discovery observer request 077. The strict custody reader, public CLI execution, process/resource limits, stream bounds and cleanup remain unchanged.

Three inert regressions cover private versus inherited file creation, preservation of the parent mask on success and failure, rejection of invalid masks before I/O or spawning, and admission of identical receipt-bound temporary content at 0600 with rejection at 0644 and descriptor cleanup.

Validation and boundary

  • Exact five-file replacement and reverse reconstruction checked against main 0a7d90539ba3bc8b3d109ff96d10ee043afe5561.
  • Current open PR file lists checked; no direct overlap with these five paths.
  • New tests are unrun locally because the executor is unavailable. Ordinary PR/main CI and genuine native evidence remain required.
  • The observed diagnostic establishes the new file's permissions, not the native binary's exact creation flags or chmod implementation. An explicit native permission change must still fail the unchanged strict reader.
  • Native processes launched internally by the published UAP CLI are unchanged; this patch makes no broader writer-coverage claim.

Follow-up to #1087. No workflow, runner, release, dependency, or frozen VS Code change.

Summary by CodeRabbit

  • Improvements
    • Files created during supported background checks now receive private permissions, limiting access to the process owner.
    • Background checks can apply a specified file-permission mask; invalid masks are rejected before the check starts.
    • Existing permission settings remain unchanged after checks complete or fail to start.
  • Tests
    • Added coverage for file permissions, invalid settings, and cleanup of open files.

E2E follow-up status — evidence through 2026-11-28 08:55 UTC

  • Current merged correction: #1146, head 2cb112fda239f1c899d13c73f865b1c67ecd2c8c, ordinary squash 4e68de5cbf579e28a8304487882e73a17e5f7302, tree 62e7f5c1e9c0eb01489635e5ff69e640421e624c. The signed merge and PR synthetic 5005d64e3b55753fb04a6aa959448f5afcc32abd have that exact reviewed tree. An actual R13 Claude preflight failure observed a newly created passive temporary file with mode 0644: 76 tests passed, one errored, and the Marketing lifecycle did not run. The narrow fix gives only the genuine Claude fixture and joined Claude discovery probe a per-child creation mask of 077. Default probe behavior, public CLI execution and strict 0600 custody admission are unchanged. Exact five-file parity, independent source review and existing workflow selection are clear. The native writer's creation flags or explicit chmod behavior remain unproven; any further invalid mode must still refuse.
  • Current execution: the PR1146 staged-package check passed its one outer hermeticity test with zero skips on the exact synthetic/tree above. This is not execution of the three new Python regressions. Those regressions, genuine Claude validation, full Required, instrumented Copilot and the OpenCode provisioning gate remain queued/pending. Ordinary main checks have been created for 4e68de5…. No queued result is counted as a pass.
  • Previous corrected baseline is independently verified: #1145, main 0a7d90539ba3bc8b3d109ff96d10ee043afe5561, tree 86687d388bd3c16506a3c528fef03bf4f8f1b198, passed both complete Required lanes: PR synthetic and merged main. Each had 176 unique Go packages, 1,231 Node passes with six explicit skips, 133 conformance passes, and successful generated-file/vet checks. All nine executable main Required checks and all six PR Terminal/Skills jobs passed. Own R14 Marketing Codex and Cursor passed their complete 18-stage and 16-stage reports respectively, including fresh profile-E policy-49 closure and actual 17/17 corrected Copilot preflight tests. Each overall preflight retained its one unrelated genuine-Claude availability skip. These runs retain their original source and scope.
  • OpenCode provisioning remains an actual validation gate: ci: verify pinned OpenCode client provisioning #1145 adds a command-scoped allowance for the existing exact opencode-ai@1.18.34 postinstall and a bounded genuine --version check. The source-supported correction addresses the observed skipped-postinstall warning. Its own native version and subsequent Marketing lifecycle are still unrun. Earlier OpenCode V2.2.5 or separately provisioned runtime results do not substitute for this npm route.
  • Earlier fixes and full matrices remain qualified: #1144 corrected only the exact three-representation preflight assertion and preserved the production refusal; its own corrected regression ran successfully in R13 and R14 Marketing jobs. Later failures from older sources at that same assertion did not reach the lifecycle and did not require another patch or rerun. #1143 fixed the macOS fixture's canonical parent and passed all six Terminal/Skills jobs, including the four prior failures. Its eleven runtime cells report success with their individually reviewed platform, provider and export boundaries. The R9 full live matrix has all 18 cells qualified with own reports and artifact size/SHA256/CRC checks; the separate remaining-target matrix has all nine cells qualified. Prepared, registration, filesystem and scripted-provider evidence retain their individual limits.
  • Prior Claude positive evidence is retained without hiding the later failure: main21b Claude passed 379 preflight tests and all 16 lifecycle stages, with 50 verified exported native-stream joins, four fresh Project/User absence checks, foreign-state preservation and the finite original-FD/backup/four-receipt transition. That successful execution does not close the later R13 mode failure. Full physical absence, writer closure, model/authentication and an unobserved historical cause remain unclaimed.
  • Remaining finite goal: actual corrected-source Claude regressions/native lifecycle; actual instrumented Copilot cold Project, later scopes, cleanup and fresh profile E; actual OpenCode npm version/provisioning and lifecycle; and relevant current-source Required checks. Copilot's earlier cold-Project failure still lacks a final corrected-source outcome. Additional unchanged Authoring/SDK/package-manager repeats do not introduce new feature scope solely by being queued, and no required check is waived.

Evidence retained only in complete console/source records during the executor outage explicitly lacks independent ZIP/CRC verification until recovery. Skipped, cancelled, metadata-only and Prepared observations are not promoted to native passes. No CI reruns, dispatches, manual cancellations, runner changes or release publication were used.

@strix-security

Copy link
Copy Markdown

Strix is installed on this repository, but we couldn't run this PR security review because this workspace's trial has ended. Add a card to resume code reviews here.

So far, Strix has reviewed 392 pull requests, surfaced 113 security issues (1 critical/high) and blocked 3 risky merges across this workspace.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

run_probe now supports an optional child process umask and validates supplied values. Claude discovery uses 0o077. Tests cover child file permissions, parent umask behavior, and custody checks.

Changes: Probe process umask

Layer / File(s) Summary
Add optional child umask
scripts/native_client_research.py, scripts/test_native_client_research.py
run_probe accepts an optional umask, validates its type and range, and passes valid values to Popen. Tests cover omitted and supplied masks, invalid values, process outcomes, and file creation.
Apply private umask to Claude probes
scripts/marketing_kit_claude_discovery.py, scripts/test_marketing_kit_claude_discovery.py, scripts/test_marketing_kit_claude_retirement.py
Claude discovery and the native Claude probe use umask 0o077. Tests check that files created under this mask have mode 0600 and pass custody checks; files created under the default 022 mask have mode 0644 and are refused.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to 2cb11

This change makes the Claude probe create its state files with private permissions, so the custody check no longer rejects them. The default behavior for other probes is unchanged. No concrete merge-blocking risk was found. Normal CI should confirm the new tests.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the Claude e2e probe state is now created with private (0600-compatible) permissions via a per-child umask. It matches the raw summary and objectives. The title uses t…
Description check Passed The description follows the repository template's intent. It has a Problem section explaining the failure, a Change section describing the optional umask and its scope, and a Validation and boundary s…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the Claude e2e probe state is now created with private (0600-compatible) permissions via a per-child umask. It matches the raw summary and objectives. The title uses the conventional 'fix(e2e):' prefix and is 60 characters, within a reasonable length.

Full details: Description check

Explanation

The description follows the repository template's intent. It has a Problem section explaining the failure, a Change section describing the optional umask and its scope, and a Validation and boundary section stating what was and was not verified. The template's Summary, Verification, and Release Impact headings are not used literally. The Verification checklist items (go test, make lint, make vet, make generated-check) are absent. The author states the new tests are unrun locally, and the change is in Python scripts, so the Go-specific commands may not apply. Release impact is covered in prose: no workflow, runner, release, or dependency change. Adding the template headings and the checklist state would make it fully conform.

Resolution

Optional: map the content to the template's Summary, Verification, and Release Impact headings. State explicitly which template checklist items apply to this Python-only change, and note why the Go and make targets are not run if they are not applicable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 0a7d905 and 2cb112f.

Files selected for processing: 5

  • scripts/marketing_kit_claude_discovery.py
  • scripts/native_client_research.py
  • scripts/test_marketing_kit_claude_discovery.py
  • scripts/test_marketing_kit_claude_retirement.py
  • scripts/test_native_client_research.py

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@codecov

codecov Bot commented Nov 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.43%. Comparing base (0a7d905) to head (2cb112f).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1146   +/-   ##
=======================================
  Coverage   64.43%   64.43%           
=======================================
  Files        2356     2356           
  Lines      143429   143429           
=======================================
  Hits        92421    92421           
- Misses      37908    37910    +2     
+ Partials    13100    13098    -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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