Skip to content

Require the hostile-environment axes as merge gates - #728

Merged
omkhar merged 3 commits into
mainfrom
fixup/hostile-lane-required
Sep 10, 2026
Merged

Require the hostile-environment axes as merge gates#728
omkhar merged 3 commits into
mainfrom
fixup/hostile-lane-required

Conversation

@omkhar

@omkhar omkhar commented Sep 9, 2026

Copy link
Copy Markdown
Owner

What changed

Promotes the four hostile-environment CI axes from an advisory lane to required merge gates. PR #727 reduced the flakes that could trip them and all four axes have proven green together (tmpdir/workspace/root/uidmap).

  • .github/workflows/ci.yml — removed continue-on-error: true from the hostile-env job so a red axis fails the job; rewrote the job comment to say the four contexts are now required. max-parallel: 1 and everything else unchanged.
  • policy/github-hosted-controls.toml — added the four contexts to [required_status_checks].contexts: Hostile environment (tmpdir), Hostile environment (workspace), Hostile environment (root), Hostile environment (uidmap).
  • internal/metadatautil/workflows.go — validator mapping update (see below).
  • internal/metadatautil/workflow_validation_test.go — added a matrix-job fixture to TestCheckWorkflowsRecognizesRequiredJobNames proving the four expanded leg contexts map through CheckWorkflows.
  • policy/workflow-lane-policy.json / policy/workflow-lanes.json / docs/github-workflows.md — corrected the now-false "advisory / continue-on-error / not a required check" language to reflect the required gate (manifest regenerated from the source policy; authority/local_mode unchanged — both remain accurate).

Matrix-mapping approach

CheckWorkflows requires each context string to match a collected workflow job name literally. The hostile-env job's name: is the template Hostile environment (${{ matrix.axis }}), which does not literally equal the four leg contexts — so a naive add would have failed the PR's own Validate repository check.

Following the repo's existing handling of matrix lanes, CollectWorkflowJobNames now expands a matrix job's name: template against matrix.include, reusing the existing workflowLaneExpandMatrix / workflowLaneRenderJobName helpers. Non-matrix jobs expand to their single unchanged name (no behavior change for the existing nine contexts). This yields exactly the four concrete leg names as matchable required contexts.

Live ruleset

The live default-branch ruleset (main-status-checks) must add the same four contexts to its required_status_checks rule before the post-merge push-to-main hosted-controls run, which cross-checks live against this TOML. That update is applied separately at merge time — it is not part of this PR, and the PR's own required checks pass without it (the live cross-check does not run on PRs).

…manifest + live cross-check exercised; owner-authorized hard-gate upgrade)

Promote the four hostile-environment CI axes from an advisory lane to
required merge gates now that PR #727 reduced the flakes that could trip
them and all four axes have proven green together.

- ci.yml: drop continue-on-error from the hostile-env job so a red axis
  fails the job; rewrite the job comment to say the four contexts are now
  required.
- policy/github-hosted-controls.toml: add the four
  "Hostile environment (<axis>)" contexts to required_status_checks.
- internal/metadatautil/workflows.go: CollectWorkflowJobNames now expands
  a matrix job's name: template against matrix.include (reusing the lane
  helpers) so each concrete leg name matches a required status-check
  context. Non-matrix jobs expand to their single unchanged name.
- workflow_validation_test.go: prove a matrix job maps its four expanded
  leg contexts through CheckWorkflows.
- workflow-lane-policy.json / workflow-lanes.json / github-workflows.md:
  correct the now-false "advisory / continue-on-error / not a required
  check" language to reflect the required gate.

The live default-branch ruleset must add the same four contexts before
the post-merge push-to-main hosted-controls run; that update is applied
separately at merge time.
@omkhar

omkhar commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 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-10T12:46:49.693255Z 63ecd9e 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 56f5d03127

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 94d7c09637

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +624 to +625
hostile-env:
name: Hostile environment (${{ matrix.axis }})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Add a negative matrix-name validator fixture

The new matrix expansion path is tested only with four valid rows. Add a negative fixture that proves CheckWorkflows rejects a required context not produced by the matrix, such as an unresolved or absent matrix value; otherwise this security-sensitive validator can regress to accepting a context that GitHub never emits, leaving merges permanently blocked or the policy misleading. 【F:AGENTS.md†L155-Lussia156】

Useful? React with 👍 / 👎.

"authority": "github-only",
"local_mode": "none",
"github_only_reason": "advisory rerun of repository validation under a container running as uid 0, where a chmod assertion and a write-only read assertion stop holding; it carries continue-on-error and is absent from required_status_checks while its first failures are triaged, so it never gates a PR or release and is not part of any local profile plan; docs/github-workflows.md carries the local reproduction sequence for WORKCELL_HOSTILE_ENV=root, which builds the validator image and selects the repo-core profile the hosted job uses"
"github_only_reason": "required rerun of repository validation under a container running as uid 0, where a chmod assertion and a write-only read assertion stop holding; it is a required merge gate in required_status_checks that runs only on GitHub, with no local mirror and no place in any local profile plan; docs/github-workflows.md carries the local reproduction sequence for WORKCELL_HOSTILE_ENV=root, which builds the validator image and selects the repo-core profile the hosted job uses"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Select the hostile axes in the pr-parity plan

When ci-plan or pre-merge uses the pr-parity profile, PlanWorkflowLanes checks Profiles before LocalMode, so omitting profiles: ["pr-parity"] makes all four newly required axes appear as skipped: not-in-profile rather than selected github-only gates. This makes the parity evidence contradict the hosted required-check policy; add the profile to all four policy entries and regenerate the manifest.

AGENTS.md reference: AGENTS.md:L294-L295

Useful? React with 👍 / 👎.

@omkhar
omkhar merged commit 84aeb16 into main Sep 10, 2026
19 checks passed
@omkhar
omkhar deleted the fixup/hostile-lane-required branch September 10, 2026 13:37
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