Skip to content

fix(e2e): diagnose Claude custody and Copilot Project refusals - #1141

Merged
777genius merged 2 commits into
mainfrom
fix/e2e-claude-custody-diagnostics-20261128
Nov 28, 2026
Merged

777genius merged 2 commits into
mainfrom
fix/e2e-claude-custody-diagnostics-20261128

Conversation

@777genius

@777genius 777genius commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Why

Two completed native jobs refused filesystem state without exporting enough bounded metadata to diagnose it:

  • Claude on main 6a6edd failed the initial held-file metadata predicate during the second genuine retirement preflight, before the Marketing lifecycle started. The rejected type, link count, owner, mode and size were not exported. This is separate from the backup-retention failure addressed by fix(e2e): retain Claude initialize backup custody #1140.
  • R9 Copilot Marketing passed add, repeat, update and intact repair, then rejected a newly created Project snapshot entry during cold restore. The report did not identify the entry's category. Cold restore remains unqualified.

Change

Add bounded diagnostics to the existing refusals, preserving every admission predicate and the original iteration order.

  • Claude uses only stat observations already captured by the three descriptor/named-member/held-descriptor guards. It preserves lazy evaluation, the single owner query and original I/O exceptions. The isolated two-file diagnostic delta is ported from feat(policy): layered enterprise installation governance #1130 at 4c34ae41; no enterprise feature code is included.
  • Copilot reports a fixed reason, fixed key-family category, captured value class/prefix and the existing diagnostic projection restricted to the single failed key. The singleton prevents the failure from disappearing among many valid additions. Raw targets, roots and values are not exported.
  • Diagnostic or serialization failures retain the original refusal. No content reads, additional filesystem observations, retries, baseline refresh, permissions or ownership allowance are added.

The existing backup, receipt, temporary-file, foreign-state and descriptor-custody rules remain unchanged. These diagnostics make the failures actionable; the old rejected files are not declared safe.

Validation

The final composition passed 20 focused inert regressions, zero failures and zero skips: all 17 Copilot refusal controls plus the three newly added Claude metadata controls. The tests cover real filesystem preservation, private-target redaction, a FIFO that is never opened, an offending entry among 80 valid additions, lazy stat observations, and original exceptions on diagnostic failures.

The exact four-file tree is 96ae0b5e4c28f21c80d4452a7b304a8b3d238f00. Independent frozen-source reviews are clear. AST comparison confirms that removing the Copilot diagnostic helper and restoring the three original raises reproduces the original module; all 13 pre-existing Copilot test methods are unchanged. git diff --check passed.

Ordinary source-triggered CI and merged-main native qualification remain pending. Existing failed jobs remain historical failures. No local native clients or product build campaign was run.

Tracks #1087, #1133 and #1140.

Summary by CodeRabbit

  • Bug Fixes
    • File-custody validation failures now include bounded file metadata and a reason, making diagnostic messages more informative. Existing custody checks remain unchanged, and diagnostics do not read file contents.
    • Metadata lookup failures continue to propagate as their original exceptions, without added diagnostic details.
  • Tests
    • Added coverage for validation failures, metadata handling, and metadata lookup errors.

E2E follow-up status — 2026-11-28 04:39 UTC

  • Merged correction: #1144, head ef1bab9d8f612516564168b99e989d73f9f4d016, ordinary squash a927a6030be2a775e2541aa14e849ce8e7b945bb, tree 1829f58abb850416f46571176f39fade5b83e172. The one-test change accepts the three exact representations of the same rejected symlink. Independent source review is clear; local execution was unavailable, and normal CI execution is pending.
  • Actual preflight failure: PR1141 Claude job selected 377 tests: 376 passed and one Copilot diagnostic assertion failed. The genuine Claude unit passed twice; the Marketing lifecycle did not begin. PR1144 fixes that test expectation without changing production admission or refusal behavior.
  • Earlier native result remains distinct: PR1140 Claude job passed all 16 lifecycle stages, including the finite backup-custody fix, with published CLI 0.1.116 and genuine Claude 2.1.263. Its exported scope does not claim complete physical removal or global writer closure.
  • Still in progress: the genuine Marketing Copilot cold-Project failure awaits the instrumented native result. The corrected PR1143 macOS Terminal job has started and reached the affected CLI contracts; its final result is pending. PR1143 Required CI remains running, and PR1144/main checks are awaiting normal execution.
  • Completed evidence: PR1141 and main 21b5ea7 full Required lanes passed: 176 unique Go packages, 1,231 Node passes with six explicit skips, and 133 conformance passes. The original full live matrix has 13 of 18 cells qualified; the remaining-target matrix has all nine cells qualified within their individual native, prepared, and refusal limits. Five full live cells remain pending.

Queued, running, cancelled, skipped, metadata-only and prepared observations are not promoted to native passes. No CI reruns, dispatches, cancellations, runner changes or release publication were used.

Port the isolated metadata diagnostics and three refusal controls from PR #1130 at 4c34ae4. Preserve the existing predicates, lazy observations, held-descriptor custody and I/O exceptions.

The old main6a6 genuine preflight failed before the Marketing lifecycle without exporting its rejected metadata. This change makes that refusal actionable; it does not admit the rejected file or claim a native fix.
@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

Descriptor and named-member custody validation failures now include observed metadata and failure reasons in their exceptions. Custody checks remain unchanged. Tests cover refusal diagnostics, confirm file contents are not read, and verify metadata I/O errors propagate unchanged.

Changes: Passive custody diagnostics

Layer / File(s) Summary
Custody failure diagnostics and validation
scripts/marketing_kit_claude_retirement.py, scripts/test_marketing_kit_claude_retirement.py
Descriptor and named-member validation failures attach captured metadata and failure reasons to ValueError exceptions. Tests check bounded diagnostics, no file-content reads, and unchanged propagation of metadata I/O errors.

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

Change: Other

Merge Risk: Minimal · up to fc190

This change adds bounded diagnostic metadata to existing custody refusals without changing the checks themselves. No actionable merge-blocking risk was found in the supplied changes.

Pre-merge checks: Passed 4

Check name Status Explanation
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.
Title check Passed The title names the two areas the PR changes: diagnostics for Claude custody refusals and for Copilot Project refusals. It is specific and follows the conventional-commit style. The PR diagnoses refus…
Description check Passed The description follows the repository template in substance. It has a Why section and a Change section, which together cover what changed and why, so it fits the template's Summary intent. The Valida…
Full details: Title check

Explanation

The title names the two areas the PR changes: diagnostics for Claude custody refusals and for Copilot Project refusals. It is specific and follows the conventional-commit style. The PR diagnoses refusals and does not fix the underlying native failures, and the title says "diagnose", which matches that scope.

Full details: Description check

Explanation

The description follows the repository template in substance. It has a Why section and a Change section, which together cover what changed and why, so it fits the template's Summary intent. The Validation section gives detailed test evidence and the pending CI status. The template's Verification checkboxes are not ticked, and the Release Impact checklist is missing. Neither is marked as done, and neither is addressed explicitly. The template asks for these, so the description is mostly complete but not fully aligned.

Resolution

Optionally tick or address the template checkboxes: state whether go test ./..., make lint, make vet, and make generated-check were run (the description says no local native clients or build campaign ran), and add a Release Impact section that states whether there is a public contract change, whether docs were updated, and whether release-sensitive paths were reviewed.

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 11ac0bc and fc190c0.

Files selected for processing: 2

  • scripts/marketing_kit_claude_retirement.py
  • scripts/test_marketing_kit_claude_retirement.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.

@777genius 777genius changed the title fix(e2e): report bounded Claude passive custody refusals fix(e2e): diagnose Claude custody and Copilot Project refusals Nov 28, 2026
@777genius
777genius merged commit 21b5ea7 into main Nov 28, 2026
25 of 28 checks passed
@777genius
777genius deleted the fix/e2e-claude-custody-diagnostics-20261128 branch November 28, 2026 02:09
777genius added a commit that referenced this pull request Nov 28, 2026
Integrate accepted main #1141 without conflicts. Only the Copilot cold Project diagnostic and its regressions are new relative to the feature head; Claude custody diagnostics are already identical.

The combined tree passed all 17 affected Python tests and independent source review. The preceding feature tree's actual test-core command also passed with identical Go contents; full final-source and actual-main E2E qualification remain required.
@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 (11ac0bc) to head (e1b6563).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1141   +/-   ##
=======================================
  Coverage   64.43%   64.43%           
=======================================
  Files        2356     2356           
  Lines      143429   143429           
=======================================
+ Hits        92421    92424    +3     
+ Misses      37911    37910    -1     
+ Partials    13097    13095    -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