Repository navigation
Conversation
ChristianPavilonis
left a comment
There was a problem hiding this comment.
Summary
This change makes documentation proposals manually dispatched for a chosen branch and commit range, and pins the resolved commit across jobs. The branch selection is not yet reflected in proposal identity, allowing runs for different target branches to overwrite or reuse the same proposal.
Blocking
🔧 wrench
- Scope proposal identity to the target branch — see inline at
scripts/docs-proposal/publish.sh:108
Verification
- Reproduced the cross-branch collision using a temporary local Git repository and stubbed GitHub calls: publishing the same SHA for
releaseoverwrote the shared proposal branch, edited the existingmainPR, and created no release PR. - The proposed fix has not been applied or tested. No one-click suggestions are included.
- The original checkout and reviewer worktree remain clean.
CI Status
- integration tests (Fastly EC lifecycle): PASS
- integration tests: PASS
- browser integration tests: PASS
- trace runtime and browser acceptance: PASS
- CodeQL: PASS
- Analyze (rust): PASS
- prepare integration artifacts: PASS
- worker-deadlines (cloudflare): PASS
- cargo fmt: PASS (required)
- cargo test (ts CLI, native) (ubuntu-latest): PASS
- Analyze (javascript-typescript): PASS
- CI Node pin guard: PASS
- HTML EOF runtime (Fastly): PASS
- Analyze (actions): PASS
- vitest: PASS
- cargo test (axum native): PASS
- cargo test: PASS (required)
- format-typescript: PASS (required)
- cargo check (cloudflare native + wasm32-unknown-unknown): PASS
- CLAUDE.md symlink guard: PASS
- format-docs: PASS (required)
- cargo check/build/test (spin native + wasm32-wasip1): PASS
- docs-proposal scripts: PASS
- cargo test (cross-adapter parity): PASS
- worker-deadlines (spin): PASS
- cargo test (ts CLI, native) (macos-latest): PASS
- ts dev lint domains (changed lines): PASS
- Analyze (javascript-typescript): PASS
- Analyze (python): PASS
| gh pr edit "$pr_number" --title "$title" --body-file "$work_dir/pr-body.md" | ||
| else | ||
| pr_url="$(gh pr create --base main --head "$branch" --title "$title" --body-file "$work_dir/pr-body.md")" | ||
| pr_url="$(gh pr create --base "$DOCS_PROPOSAL_BRANCH" --head "$branch" --title "$title" --body-file "$work_dir/pr-body.md")" |
There was a problem hiding this comment.
🔧 wrench — Scope proposal identity to the target branch
docs_proposal_branch() still keys proposals only by SHA. When main and release contain the same commit, publishing for release finds the existing main proposal and edits it without changing its base. It can also overwrite that proposal’s generated changes—or skip publication entirely if the original PR is closed.
Verified with a temporary local Git repository and stubbed GitHub calls: the release run overwrote the shared proposal branch, edited the main PR, and created no release PR.
Proposed fix: include the target branch in proposal identity, preserving existing names for main:
docs_proposal_branch() {
if [ "$DOCS_PROPOSAL_BRANCH" = main ]; then
printf 'docs/auto/%s\n' "${1:0:12}"
else
local branch_hash
branch_hash="$(printf '%s' "$DOCS_PROPOSAL_BRANCH" | git hash-object --stdin)"
printf 'docs/auto/%s/%s\n' "$branch_hash" "${1:0:12}"
fi
}Update the release test’s expected branch and add coverage publishing the same SHA against both branches.
Apply manually — the helper is outside the diff hunks, and regression coverage requires separate edits. Proposed fix not yet tested.
Summary
main; maintainers start the workflow from the Actions tab and choose what it covers.branch(defaultmain),since(required; the proposal covers every change after it) and an optionalsha(defaults to the branch head). The PR opens against the chosen branch.sincethat is not an earlier commit ofshanow fails the run instead of silently falling back to a single-commit proposal.Changes
.github/workflows/docs-proposal.ymlpushtrigger; addbranch/since/shainputs; propose resolves the commit once and validate/publish use that job outputscripts/docs-proposal/lib.shorigin/$DOCS_PROPOSAL_BRANCH(defaultmain)scripts/docs-proposal/publish.sh--base "$DOCS_PROPOSAL_BRANCH"scripts/docs-proposal/propose.shscripts/docs-proposal/test.shmainbranch for reachability and the PR baseCloses
No linked issue.
Spec
Not a feature
Test plan
cargo test-fastly && cargo test-axumcargo clippy-fastly && cargo clippy-axumcargo fmt --all -- --checkcd crates/trusted-server-js/lib && npx vitest runcd crates/trusted-server-js/lib && npm run formatcd docs && npm run formatcargo build --package trusted-server-adapter-fastly --release --target wasm32-wasip1fastly compute servescripts/docs-proposal/test.shpasses; propose + validate jobs run withactagainst local scripts (validsincepasses, badsincefails before Copilot runs). Publish was not run withactsince it would push and open a real PR;test.shcovers it with a stubbedgh.shellcheckwas not run locally.Checklist
unwrap()in production code — useexpect("should ...")logmacros (notprintln!)