Skip to content

fix(ci): unblock journey pull requests - #418

Open
abharms wants to merge 3 commits into
journey-to-the-shadow-domfrom
fix/journey-ci-small-repair
Open

abharms wants to merge 3 commits into
journey-to-the-shadow-domfrom
fix/journey-ci-small-repair

Conversation

@abharms

@abharms abharms commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • restore the complete main-owned workspace manifest set before the major-release preview frozen install, removing PR-only importers that cannot match main lockfile
  • correct the direction-isolation story so provider RTL is tested independently from a hostile LTR host
  • give the two multi-step controlled-reader behavior tests explicit CI headroom
  • add the required empty changeset

This intentionally does not include the broader major-release-signoff security redesign from closed PR #416. That repository-wide work should be evaluated separately from a branch based on main.

YPE-5931

PR 414 and 415 failure coverage

Both PRs failed for the same two reasons:

  • Storybook expected the hostile host wrapper to inherit RTL, while CI correctly observed LTR.
  • Major release preview combined main lockfile with journey workspace manifests, causing ERR_PNPM_OUTDATED_LOCKFILE for three UI dependencies.

The preview preparation and frozen-lockfile validation now pass against the immutable heads of both PRs:

Validation

  • major-release-signoff regression suite: 32/32 passed
  • Bible version picker Shadow DOM story file: 8/8 passed
  • full UI Vitest assertions: 565/565 passed; the local process subsequently reported the sandbox-only EPERM restriction while binding the Storybook browser socket
  • pnpm test
  • pnpm lint
  • pnpm typecheck
  • Prettier and git diff --check

RetriggerConfidence Score: 5/5

The PR appears safe to merge.

Fix All in Claude CodeFindings

  1. P2 Workspace pattern duplicates configuration
Fix with agent prompt
### Issue 1
.github/workflows/major-release-signoff.yml:undefined-220
The cleanup and restoration passes hard-code the current one-level workspace layout instead of deriving it from the restored `pnpm-workspace.yaml`. When main adds a nested importer, another workspace root, or a broader glob, its manifest will not be restored consistently, increasing maintenance cost and allowing the frozen install to reject the main lockfile.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR repairs major-release preview preparation and stabilizes the affected Shadow DOM and controlled-reader checks.

  • Restores main-owned workspace manifests and installation inputs before the frozen preview install.
  • Computes introduced major releases against the immutable pull-request base and head.
  • Corrects the RTL provider story under an LTR host and adds CI timeout headroom to two multi-step tests.
  • Adds regression coverage and an empty changeset required by the workflow.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Resolve immutable PR context] --> B[Fetch trusted main]
  B --> C[Restore release tooling and dependency inputs]
  C --> D[Install with frozen lockfile]
  D --> E[Find merge base of PR base and head]
  E --> F[Compute release preview]
  F --> G{PR introduces a major release?}
  G -->|No| H[No signoff required]
  G -->|Yes| I[Enforce major-release signoff]
Loading

Reviews (3) · Last reviewed commit: "test(ci): exercise stacked release previ..."

@changeset-bot

changeset-bot Bot commented Sep 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 93f9225

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-18T18:06:26.456524Z 93f9225 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

# then restore every manifest selected by main's workspace configuration so its
# lockfile and dependency graph remain internally consistent.
git ls-files |
grep -E '^(packages|examples|tools)/[^/]+/package[.]json$' |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Workspace pattern duplicates configuration

The cleanup and restoration passes hard-code the current one-level workspace layout instead of deriving it from the restored pnpm-workspace.yaml. When main adds a nested importer, another workspace root, or a broader glob, its manifest will not be restored consistently, increasing maintenance cost and allowing the frozen install to reject the main lockfile.

Prompt To Fix With AI
This is a comment left during a code review.
Path: .github/workflows/major-release-signoff.yml
Line: 220

Comment:
**Workspace pattern duplicates configuration**

The cleanup and restoration passes hard-code the current one-level workspace layout instead of deriving it from the restored `pnpm-workspace.yaml`. When main adds a nested importer, another workspace root, or a broader glob, its manifest will not be restored consistently, increasing maintenance cost and allowing the frozen install to reject the main lockfile.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Fix in Claude Code Fix in Cursor Fix in Codex

cameronapak
cameronapak previously approved these changes Sep 18, 2026

@cameronapak cameronapak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

YPE-5931

Summary

Approve. Standards: 0 must-fix. Spec: 0 must-fix. Primary concern: none.

Review evidence
  • Scope: reviewed HEAD, both commits, Jira and comments, repository guidance, and existing review threads.
  • Method: separate sequential Standards, Spec, and Correctness passes; traced workspace restoration, release classification, provider direction, and the two controlled-reader workflows. No material simplification warranted expanding this repair.
Behavior or check Method / command Result Evidence source
Workflow regression coverage bash .github/scripts/major-release-signoff.test.sh 33 passed, 0 failed Reviewer-run
Controlled reader pnpm --filter @youversion/platform-react-ui exec vitest run --project unit src/components/bible-reader-controlled.test.tsx 33 passed Reviewer-run
Provider RTL inside hostile LTR host pnpm --filter @youversion/platform-react-ui exec vitest run --project storybook src/components/bible-version-picker.shadow-isolation.stories.tsx 8 passed in Chromium Reviewer-run, synthetic Storybook app key
Stacked release classification Executed scripts/preview-release.mjs with each merge base Main comparison reports introduced major; actual PR-base comparison correctly reports none Reviewer-run; CI preview agrees
  • Limits: the first local browser attempt could not start because its Chromium executable was missing; installing the expected browser resolved it and the rerun passed. Historical PR #414/#415 heads were not independently rerun. The broader security redesign is explicitly out of scope.
  • CI and bot review: build, lint, type checks, and release preview succeeded; UI CI passed 645 assertions. The existing workspace-pattern concern describes future maintenance; the patterns match current main. No duplicate comment added.
  • Event: APPROVE.

Written by Code Reviewer bot on behalf of Cam.


export const DirectionOnlyInheritanceRejectsHostVisualValues: Story = {
export const ProviderDirectionRejectsHostVisualValues: Story = {
globals: { interfaceDirection: 'rtl' },

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Setting the provider to RTL inside an LTR host makes this test prove which direction the SDK follows.

For Agents: independent direction inputs

The explicit interfaceDirection: 'rtl' and host dir="ltr" distinguish provider-owned direction from accidental host inheritance. The story checks an RTL trigger and heading while the wrapper stays LTR, including after hostile styles are applied. All eight stories in this file passed in the local Chromium run.

Written by Code Reviewer bot on behalf of Cam.

@cameronapak cameronapak left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pre-emptively approved but thinking...

@cameronapak
cameronapak dismissed their stale review September 18, 2026 15:49

Dismissing at Cam’s request: not ready for approval yet.


if grep -Fq 'BASE_SHA: ${{ needs.context.outputs.base_sha }}' "$WORKFLOW" &&
grep -Fq 'git fetch --no-tags --force origin "$BASE_SHA"' "$WORKFLOW" &&
grep -Fq 'BASE=$(git merge-base "$BASE_SHA" "$HEAD_SHA")' "$WORKFLOW"; then

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: Replace this text check with one test that proves inherited breaking changes do not require signoff, but a breaking change added by this PR still does.

For Agents: exercise both release-preview outcomes

This block only checks that three strings appear somewhere in the workflow. It does not execute the comparison or verify the resulting decision. The current implementation behaved correctly in my manual comparison; this is a non-blocking regression-test improvement, not a reported defect.

Reuse this suite's temporary Git repository pattern and extract_step helper for one two-stage scenario:

  1. Create main, then a target branch containing a major changeset, then a PR branch containing only a non-major change. Run the workflow's actual Compute release preview step with the captured target/PR commit IDs and the real preview script. Assert introduced_major: false in preview.json and is_major=0 in GITHUB_OUTPUT.
  2. Add a separate major changeset to that same PR branch. Keep the target commit fixed, update HEAD_SHA, and rerun with a fresh output file. Assert introduced_major: true and is_major=1.

Keep the remote local to the fixture and use minimal valid Changesets/package configuration. Do not hard-code the expected comparison base into a replacement preview implementation: the test should exercise the workflow's choice of base. Reverting to the old main comparison should fail stage 1; always reporting no introduced major should fail stage 2.

This adds fixture setup compared with grep, but protects the behavior described in YPE-5931 rather than the spelling of the implementation.

Written by Code Reviewer bot on behalf of Cam.

@abharms
abharms requested a review from cameronapak September 18, 2026 18:14
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.

2 participants