Skip to content

test(e2e): preserve profile A during Marketing Kit peer initialization - #1111

Merged
777genius merged 1 commit into
mainfrom
fix/marketing-kit-peer-initialization-guard
Nov 25, 2026
Merged

777genius merged 1 commit into
mainfrom
fix/marketing-kit-peer-initialization-guard

Conversation

@777genius

@777genius 777genius commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

Postmerge acceptance — final Marketing matrix pending

Ordinary merge 26293e02 is confirmed. Both parents and all 3 changed file blobs/statuses match the reviewed candidate.

The actual-main Required run is now complete and successful. All nine applicable jobs executed successfully; the source classifier is an explicit conditional skip. Original logs bind the actual merge checkout and confirm:

  • Primary Go, manifest, generated and vet checks; 1231 npm passes, zero failures and six explicit skips; 133 conformance fixtures.
  • Staged-hermetic: one pass, zero skips.
  • Windows, Linux and macOS SDK: 50 tests per OS, zero failures/skips, including retained Skill review/replay/exact restore across CLI-host restart and the clean packed-SDK consumer.
  • All four lint modules: actual invocations with zero issues. The final integrationctl job was 139198026695.

Both CodeQL languages, all six Govulncheck modules, and Dependency Review also completed successfully. Source-bound original Govulncheck logs report no vulnerabilities.

Remaining acceptance is the latest applicable guarded Marketing main run on d3cfbb6a, which includes this guard and #1021's later shared-helper merge. All six native lanes must actually execute and pass. The run is still waiting; the older unguarded main run and superseded or queued runs do not qualify the final guard.

Copilot's cold restore uses the explicitly preauthorized native-folder fixture, with no virgin-folder UI consent or product-granted trust claim. Claude retains writer_closure_claimed=false; only the recorded signed-cache retirement is established. This checkpoint supersedes older pending entries below.

Summary

The published Marketing Kit E2E initialized the cold User profile C before recording the complete profile A snapshot. A native initializer could therefore add an unexpected file under A/HOME and have that change accepted into the later baseline. This is a gap in the E2E custody assertion; it is not evidence that a production client actually made that write.

Capture the existing complete A profile before all C initialization steps, and verify it in a finally block. Cover new foreign writes on both normal and exceptional exits, and preserve the original initialization exception when A is unchanged. Run the regression explicitly before every native Marketing Kit lane and include its path in both PR and main-push workflow filters.

This three-file follow-up supports the ongoing E2E qualification in #1095. It starts from main 7825d7edf48792566f15f99f7872238f547e7575; the existing #1095 head is unchanged.

Verification

  • python3 -m unittest discover -s scripts -p 'test_marketing_kit_*.py': 43 passed, zero skips/failures; independently repeated on the same candidate.
  • New focused suite: 2 tests passed, including normal/exceptional foreign-write subcases and preservation of an untouched initializer exception.
  • git diff --check.
  • Independent source review of all three files: no actionable findings. This is not a formal GitHub approval.
  • Required completed successfully on exact head 8b5a8a920c49d82b85434adfe7045a3161d463cf: primary tests, staged-hermetic and path classifier passed. Lint and management SDK were source-conditional skips, not executions. Both CodeQL languages and Dependency Review passed.
  • All six actual Marketing Kit native lifecycle lanes passed: Codex, Cursor, Claude, Gemini, OpenCode and Copilot. Each original log checks out 9cc07184 (exact head 8b5a8a9 plus base 7825d7e) and executes the new peer initialization suite: regression groups of 142, 26, 11, 4 and 2 tests all pass. All six original archives were independently read; CRC and SHA-256 matched GitHub artifact digests, and workflow bindings identify this exact head. Each final receipt records status: passed, two_scope_lifecycle_qualified: true, actual User/Project lifecycle, expected corrupt-lock refusal, cold restore and removal with foreign preservation. Artifact IDs: Codex 14988394533, Cursor 14989281694, Claude 14994754287, Gemini 14995980362, OpenCode 14997490961, Copilot 14996229915. Earlier runs under the old assertion boundary remain separate evidence.
  • Ordinary merge at 26293e0293cd5c592c404fb313143afe0e70b6b8; all three reviewed blobs and both parents verified.
  • Applicable checks on the resulting main composition.

The local regressions inject real temporary filesystem writes through the existing snapshot/refusal helpers. They do not substitute for hosted native lifecycle execution.

Release Impact

No product CLI or SDK behavior, policy refusals, public format, frozen VS Code behavior, signed closure, native-client pins or published CLI version is changed. This PR creates no release or tag. Existing containment and foreign-file preservation checks remain enforced.

Summary by CodeRabbit

  • Bug Fixes
    • Release validation now detects unexpected changes to an existing project profile during setup, including when setup encounters an error. This helps catch potential profile changes before they affect a release.
  • Tests
    • Added automated checks for profile-change detection and error handling during release validation. The checks are included in the end-to-end workflow.

@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 25, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The release runner now checks that User C setup does not change Project A’s profile. New tests cover profile changes and exception handling. The E2E workflow runs these tests and includes their output in the regression log.

Changes: Peer Profile Guard

Layer / File(s) Summary
Profile guard and tests
scripts/marketing-kit-project-release-e2e.py, scripts/test_marketing_kit_peer_initialization.py
The runner snapshots Project A’s settled profile and checks it after User C setup. Tests cover writes under HOME and confirm that an initialization exception is preserved when the profile is unchanged.
E2E test wiring
.github/workflows/marketing-kit-project-release-e2e.yml
The pull request and push path filters include the peer-initialization test. The E2E job runs the test and appends its output to the regression log.

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

Change: Other

Merge Risk: Minimal · up to 8b5a8

This change strengthens an end-to-end test guard and adds a focused regression run to the workflow. It has no product behavior impact. The remaining risk is only normal CI completion.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: a test-only E2E guard that preserves profile A during Marketing Kit peer (User C) initialization. It follows the conventional commit style and matches the summary, the…
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.
Description check Passed The description follows the substance of the template's intent: it explains what changed (capturing the complete profile A snapshot before C initialization, verifying it in a finally block, covering f…
Full details: Title check

Explanation

The title names the main change: a test-only E2E guard that preserves profile A during Marketing Kit peer (User C) initialization. It follows the conventional commit style and matches the summary, the objectives, and the test-file and workflow changes. The title uses a conventional prefix and stays within a reasonable length.

Full details: Description check

Explanation

The description follows the substance of the template's intent: it explains what changed (capturing the complete profile A snapshot before C initialization, verifying it in a finally block, covering foreign writes on normal and exceptional exits, and adding an explicit regression run plus workflow path filters) and why (a custody-assertion gap in the published Marketing Kit E2E). It also gives extensive verification evidence and a release-impact statement. It does not use the template's exact headings or checkbox list: the Verification section lists go test, make lint, make vet and make generated-check items that do not apply to this Python change, and those are not addressed. The template's checkboxes for docs and release-sensitive paths are not explicitly ticked or explained. The author's checklist also leaves the merge item unchecked, which is appropriate. The description is largely complete and specific, so it meets the bar for PASS.

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 7825d7e and 8b5a8a9.

Files selected for processing: 3

  • .github/workflows/marketing-kit-project-release-e2e.yml
  • scripts/marketing-kit-project-release-e2e.py
  • scripts/test_marketing_kit_peer_initialization.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 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.03%. Comparing base (7825d7e) to head (8b5a8a9).
⚠️ Report is 51 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1111   +/-   ##
=======================================
  Coverage   64.03%   64.03%           
=======================================
  Files        2324     2324           
  Lines      141572   141572           
=======================================
+ Hits        90651    90652    +1     
  Misses      37927    37927           
+ Partials    12994    12993    -1     

☔ 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.

@777genius
777genius merged commit 26293e0 into main Nov 25, 2026
39 checks passed
@777genius
777genius deleted the fix/marketing-kit-peer-initialization-guard branch November 25, 2026 12:16
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