Skip to content

[ci] Audit typed plan publication - #3593

Open
joshlf wants to merge 1 commit into
Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbcfrom
G347jsgltowjlm4i3umxjtudzc57bjmde
Open

[ci] Audit typed plan publication#3593
joshlf wants to merge 1 commit into
Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbcfrom
G347jsgltowjlm4i3umxjtudzc57bjmde

Conversation

@joshlf

@joshlf joshlf commented Aug 25, 2026

Copy link
Copy Markdown
Member

Treat plan_ci as the source-to-runtime trust boundary for the typed
plan consumed by later jobs. Load CI inputs only after it has the exact
top-level job shape, display name, hosted runner, read-only permissions,
planner environment, output map, and no needs or strategy. Require
exactly the reviewed checkout, planner, and upload steps in order,
including their complete action pins, options, fields, and run block.

Require the workflow's complete ordered root declaration grammar before
auditing its environment. This rejects duplicate or alternate YAML key
spellings and new root defaults which could change audited behavior.

Put a parser-backed source precondition before any scanner trusts YAML
indentation. Require exactly one document. Reject multiline plain or
quoted scalars and multiline flow mappings or sequences, while retaining
single-line flow nodes and indentation-bounded literal and folded block
scalars. Reject explicit tags and unknown parser events or styles so new
syntax fails closed.

Remove the inherited setup anchors while this source audit covers only
the planner, and reject every YAML anchor and alias. The matrix bridge
can reintroduce shared step anchors only in the same change that binds
their definitions and aliases to reviewed owners and sequences.

Confine libyaml's unsafe interface to a heap-stable parser wrapper. Bind
the input lifetime to the parser, delete every initialized event exactly
once, and delete only a successfully initialized parser.

Require the first significant line to establish the expected root block
mapping. Keep jobs as the final root entry. Require every direct job
to use an unquoted two-space job_id: declaration before any nested
content.
Scanner-visible indentation is therefore structural, not scalar text.

Share command, option, and output spellings through a private workflow
protocol module. Count CLI command tokens on every non-comment workflow
line so quoted, spaced, or trailing-whitespace run keys cannot hide
duplicates. Keep step names scoped to their owning steps mapping.

Preserve comments inside run block scalars because Actions expands
expressions before the shell sees comments. Ignore only source-level
YAML comments. Treat every significant line at the step-item indentation
as a boundary, including YAML's bare - mapping form.

Extend bootstrap LF attributes to semantic YAML, TOML, and TSV inputs.
Normalize well-formed CRLF at the repository-read boundary for existing
Windows worktrees, while pure parsers and bare carriage returns fail
closed. Apply the same normalization to path reads and retained handle
reads so identity checks and parsed bytes cannot diverge. Retain the
handle across path replacement, then release it before Windows cleanup.

Add valid-YAML adversarial regressions for root, job, and field decoys
inside multiline scalars and flow collections; alternate job
indentation; later root overrides; explicit block-scalar decoys;
multiple documents; tags and non-LF line breaks; and planner replay
through anchors and aliases.

The parser precondition adds one linear pass over the workflow and no CI
job or matrix cell. Its expected latency cost is negligible.

Tests: offline zc tests
Tests: zc clippy with warnings denied
Tests: ci/check_actions.sh
Tests: ci/check_fmt.sh
Tests: git diff --check

Authored by an agent, posting via joshlf's account


Latest Update: v29 — Compare vs v28

📚 Full Patch History

Links show the diff between the row version and the column version.

Version v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v29 v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v28 v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v27 v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v26 v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v25 v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v24 v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v23 v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v22 v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v21 v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v20 v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v19 v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v18 v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v17 v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v16 v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v15 v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v14 v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v13 v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v12 v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v11 v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v10 v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v9 v8 v7 v6 v5 v4 v3 v2 v1 Base
v8 v7 v6 v5 v4 v3 v2 v1 Base
v7 v6 v5 v4 v3 v2 v1 Base
v6 v5 v4 v3 v2 v1 Base
v5 v4 v3 v2 v1 Base
v4 v3 v2 v1 Base
v3 v2 v1 Base
v2 v1 Base
v1 Base
⬇️ Download this PR

Branch

git fetch origin refs/heads/G347jsgltowjlm4i3umxjtudzc57bjmde && git checkout -b pr-G347jsgltowjlm4i3umxjtudzc57bjmde FETCH_HEAD

Checkout

git fetch origin refs/heads/G347jsgltowjlm4i3umxjtudzc57bjmde && git checkout FETCH_HEAD

Cherry Pick

git fetch origin refs/heads/G347jsgltowjlm4i3umxjtudzc57bjmde && git cherry-pick FETCH_HEAD

Pull

git pull origin refs/heads/G347jsgltowjlm4i3umxjtudzc57bjmde

Stacked PRs enabled by GHerrit.

joshlf commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

Authored by an agent, posting via joshlf's account

@codex review

@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: d0ff708110

ℹ️ 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 thread tools/zc/src/planned_adapter/source.rs Outdated
Comment thread tools/zc/src/planned_adapter/mod.rs Outdated
Comment thread tools/zc/src/planned_adapter/planner.rs
@joshlf
joshlf force-pushed the Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbc branch from a565eff to 7de4caa Compare August 25, 2026 22:48
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from d0ff708 to 665458f Compare August 25, 2026 22:48
@codecov-commenter

codecov-commenter commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.85%. Comparing base (c8bd554) to head (e5f21e0).

Additional details and impacted files
@@                        Coverage Diff                         @@
##           Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbc    #3593   +/-   ##
==================================================================
  Coverage                              91.85%   91.85%           
==================================================================
  Files                                     20       20           
  Lines                                   6093     6093           
==================================================================
  Hits                                    5597     5597           
  Misses                                   496      496           

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

@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from 6a79b53 to ad5a7c2 Compare August 26, 2026 18:55
@joshlf

joshlf commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Authored by an agent, posting via joshlf's account

@codex review

Please review the current head, ad5a7c2a27c5f2e89b0d533974c6eeca465dde85.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: ad5a7c2a27

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

@joshlf
joshlf force-pushed the Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbc branch from f2da34c to ea969d4 Compare August 26, 2026 20:11
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from ad5a7c2 to 3cedc1d Compare August 26, 2026 20:11
@joshlf

joshlf commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Authored by an agent, posting via joshlf's account

@codex review

Please review the current head, 3cedc1d21e8721dcdd887849553f709ee7d973e3.

@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: 3cedc1d21e

ℹ️ 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 thread tools/zc/src/planned_adapter/source.rs Outdated
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from 3cedc1d to 0380172 Compare August 26, 2026 22:09
@joshlf
joshlf force-pushed the Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbc branch from ea969d4 to 6b3a770 Compare August 26, 2026 22:09
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from 0380172 to d220621 Compare August 26, 2026 22:35
@joshlf

joshlf commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Authored by an agent, posting via joshlf's account

@codex review

Please review the current head, d2206213b7329d0f80607c3499519b0daad9dee4.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. You're on a roll.

Reviewed commit: d2206213b7

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

@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from d220621 to fcda88a Compare August 26, 2026 23:31
@joshlf
joshlf force-pushed the Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbc branch 2 times, most recently from 2156849 to c51f601 Compare August 27, 2026 01:18
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch 2 times, most recently from 8eb1efb to d7a4fd1 Compare August 27, 2026 10:15
@joshlf
joshlf force-pushed the Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbc branch from c51f601 to c8bd554 Compare August 27, 2026 10:15
@joshlf

joshlf commented Aug 27, 2026

Copy link
Copy Markdown
Member Author

Authored by an agent, posting via joshlf's account

@codex review

Please review the current head, d7a4fd14593753060edaca1697f1ea9f328cf33b.

@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: d7a4fd1459

ℹ️ 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 thread tools/zc/src/planned_adapter/source.rs Outdated
Comment thread tools/zc/src/planned_adapter/mod.rs Outdated
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch 2 times, most recently from d0ba440 to a46aedf Compare August 27, 2026 12:04
@joshlf

joshlf commented Aug 27, 2026

Copy link
Copy Markdown
Member Author

Authored by an agent, posting via joshlf's account

@codex review

Please review the current head, a46aedf4fb9ef8e7d573ba132ea827944b4ee448.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: a46aedf4fb

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

Treat `plan_ci` as the source-to-runtime trust boundary for the typed
plan consumed by later jobs. Load CI inputs only after it has the exact
top-level job shape, display name, hosted runner, read-only permissions,
planner environment, output map, and no `needs` or strategy. Require
exactly the reviewed checkout, planner, and upload steps in order,
including their complete action pins, options, fields, and run block.

Require the workflow's complete ordered root declaration grammar before
auditing its environment. This rejects duplicate or alternate YAML key
spellings and new root defaults which could change audited behavior.

Put a parser-backed source precondition before any scanner trusts YAML
indentation. Require exactly one document. Reject multiline plain or
quoted scalars and multiline flow mappings or sequences, while retaining
single-line flow nodes and indentation-bounded literal and folded block
scalars. Reject explicit tags and unknown parser events or styles so new
syntax fails closed.

Remove the inherited setup anchors while this source audit covers only
the planner, and reject every YAML anchor and alias. The matrix bridge
can reintroduce shared step anchors only in the same change that binds
their definitions and aliases to reviewed owners and sequences.

Confine libyaml's unsafe interface to a heap-stable parser wrapper. Bind
the input lifetime to the parser, delete every initialized event exactly
once, and delete only a successfully initialized parser.

Require the first significant line to establish the expected root block
mapping. Keep `jobs` as the final root entry. Require every direct job
to use an unquoted two-space `job_id:` declaration before any nested
content.
Scanner-visible indentation is therefore structural, not scalar text.

Share command, option, and output spellings through a private workflow
protocol module. Count CLI command tokens on every non-comment workflow
line so quoted, spaced, or trailing-whitespace run keys cannot hide
duplicates. Keep step names scoped to their owning `steps` mapping.

Preserve comments inside run block scalars because Actions expands
expressions before the shell sees comments. Ignore only source-level
YAML comments. Treat every significant line at the step-item indentation
as a boundary, including YAML's bare `-` mapping form.

Extend bootstrap LF attributes to semantic YAML, TOML, and TSV inputs.
Normalize well-formed CRLF at the repository-read boundary for existing
Windows worktrees, while pure parsers and bare carriage returns fail
closed. Apply the same normalization to path reads and retained handle
reads so identity checks and parsed bytes cannot diverge. Retain the
handle across path replacement, then release it before Windows cleanup.

Add valid-YAML adversarial regressions for root, job, and field decoys
inside multiline scalars and flow collections; alternate job
indentation; later root overrides; explicit block-scalar decoys;
multiple documents; tags and non-LF line breaks; and planner replay
through anchors and aliases.

The parser precondition adds one linear pass over the workflow and no CI
job or matrix cell. Its expected latency cost is negligible.

Tests: offline zc tests
Tests: zc clippy with warnings denied
Tests: ci/check_actions.sh
Tests: ci/check_fmt.sh
Tests: git diff --check

*Authored by an agent, posting via joshlf's account*

gherrit-pr-id: G347jsgltowjlm4i3umxjtudzc57bjmde
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from a46aedf to e5f21e0 Compare August 27, 2026 12:26
@joshlf

joshlf commented Aug 27, 2026

Copy link
Copy Markdown
Member Author

Authored by an agent, posting via joshlf's account

@codex review

Please review the current head, e5f21e0e27ac7f46da33ea0e1687628ca5aad3b5.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: e5f21e0e27

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

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