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

Load CI inputs only after plan_ci 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 that order, with 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.

Share command, option, and output spellings through a private
workflow-protocol leaf. 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 the owning steps mapping.

Preserve comments inside run block scalars because Actions expands
expressions before the shell sees comments. Ignore only source-level
YAML comments.

Extend the bootstrap LF attributes to semantic YAML, TOML, and TSV
inputs, and test the effective attributes for every coordinated path.
Normalize well-formed CRLF at the repository-read boundary for existing
Windows worktrees, while pure parsers and bare carriage returns remain
fail-closed. Reject indented continuations beneath scalar job fields so
YAML folding cannot change an audited value without changing the
scanner's view.

Keep the canonical-source scanner private and exercise publication and
source-shape mutations against a small literal YAML fixture and the live
workflow.

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: v12 — Compare vs v11

📚 Full Patch History

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

Version 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
Comment thread tools/zc/src/planned_adapter/mod.rs
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 (a8c747b) to head (e28ac83).

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 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: 094914172a

ℹ️ 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/planner.rs
Comment thread .gitattributes
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from 0949141 to e96e0b4 Compare August 26, 2026 01:28
@joshlf
joshlf force-pushed the Gg5onzlaf6nsoqoubbjg43tdiuxvvjrbc branch from c86ea11 to cc272d2 Compare August 26, 2026 01:28
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from e96e0b4 to 9d34d33 Compare August 26, 2026 01:31

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. Treat earlier reviews of older commits as stale.

@chatgpt-codex-connector

Copy link
Copy Markdown

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

Reviewed commit: 9d34d33223

ℹ️ 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 cc272d2 to a8c747b Compare August 26, 2026 09:58
@joshlf
joshlf force-pushed the G347jsgltowjlm4i3umxjtudzc57bjmde branch from 9d34d33 to e28ac83 Compare August 26, 2026 09:58
@joshlf

joshlf commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

Authored by an agent, posting via joshlf's account

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: e28ac839c7

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

Load CI inputs only after plan_ci 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 that order, with 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.

Share command, option, and output spellings through a private
workflow-protocol leaf. 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 the owning steps mapping.

Preserve comments inside run block scalars because Actions expands
expressions before the shell sees comments. Ignore only source-level
YAML comments.

Extend the bootstrap LF attributes to semantic YAML, TOML, and TSV
inputs, and test the effective attributes for every coordinated path.
Normalize well-formed CRLF at the repository-read boundary for existing
Windows worktrees, while pure parsers and bare carriage returns remain
fail-closed. Reject indented continuations beneath scalar job fields so
YAML folding cannot change an audited value without changing the
scanner's view.

Keep the canonical-source scanner private and exercise publication and
source-shape mutations against a small literal YAML fixture and the live
workflow.

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 e28ac83 to e09f241 Compare August 26, 2026 11:31
@joshlf

joshlf commented Aug 26, 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: e09f24125f

ℹ️ 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 +338 to +340
&& indentation(line) == steps.marker_indent
&& line[steps.marker_indent..].starts_with("- "))
.then_some(index)

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 Count bare-dash sequence entries as steps

A valid YAML step can put the sequence indicator on its own line, such as - followed by an indented run: or uses: mapping, but this scanner recognizes only lines starting with - . If such a step is inserted before checkout, actual_steps still reports exactly the three canonical steps and none of the exact snippets include it, so the audit passes while an unaudited preceding step can replace host-level tools used by the planner. Fresh evidence beyond the earlier exact-three-step fix is this accepted bare-dash sequence form; reject every unrecognized item at marker_indent or parse both canonical sequence spellings.

Useful? React with 👍 / 👎.

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