Skip to content

test(pages): expect the enable notice's section key once - #606

Merged
Vivswan merged 1 commit into
mainfrom
test/pages-notice-key-once
Nov 12, 2026
Merged

Vivswan merged 1 commit into
mainfrom
test/pages-notice-key-once

Conversation

@Vivswan

@Vivswan Vivswan commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Before

main's e2e job, on the commit that holds both changes:
  FAIL  pages-enable-needs-build-type-or-source
          stdout missing: ::notice::pages: pages: declared in the settings file but GitHub Pages is not enabled on the repo, and GitHub enables a site only from build_type or source, so apply changes nothing

After

$ bun test/e2e/run.ts --scenario pages-enable-needs-build-type-or-source
  PASS  pages-enable-needs-build-type-or-source
1/1 passed

Main's e2e job is red on this one scenario. Its pinned line is stale. What a run prints is right.

How

Proof

  • Slice: bun test/e2e/run.ts --sections pages ends 14/14 passed.
  • No other pin: git grep -n -P '::notice::([a-z_]+): \1: ' -- test docs prints one line on main, this scenario's, and nothing on this branch.
Technical details
  • Engine rule: underKey in src/engine/orchestrate.ts leaves a line alone when it already leads with its section key followed by :, ., or [.
  • The notice's text: src/sections/pages/index.ts, unchanged.
  • Before block: the failing lines of the checks / e2e job on main at acb5ba40.
  • File: test/sections/pages/scenarios/pages-enable-needs-build-type-or-source.yml.

The scenario pages-enable-needs-build-type-or-source pinned the notice as the engine printed it when it prefixed every section line with its key, so the text read "pages: pages: declared ...". The engine now names a notice's section once, and a line that already leads with its key is left alone, so a run prints "pages: declared ..." and the pinned line no longer matched. The two changes landed minutes apart and each passed alone. Only the expectation moves: the scenario still forbids a POST and a PUT to the Pages endpoint and still pins the advice.
Copilot AI balanced review requested due to automatic review settings November 12, 2026 04:55
@github-actions

Copy link
Copy Markdown
Contributor

File size check

0 over a hard cap (fails), 6 warning(s).

File Size Tier Cap
src/engine/diff.ts:56 11 comment lines warn 10
src/github/api-error.ts:9 11 comment lines warn 10
src/problem.ts:73 18 comment lines warn 10
src/sections/contract/errors.ts:18 11 comment lines warn 10
src/sections/contract/module.ts:55 12 comment lines warn 10
src/sections/shared/list/decl.ts:265 14 comment lines warn 10

Split the file, wrap the line, shorten or exempt the comment, or list the path in .file-size-allow.local with a # reason.

5 managed file(s) skipped; repo-platform owns them.

@github-actions

Copy link
Copy Markdown
Contributor

Member shape check

16 finding(s).

File Line Rule
src/action/io.ts 24 one-line-comment
src/cli/actions.ts 12 one-line-comment
src/github/api.ts 55 one-line-comment
src/sections/pages/index.ts 71 one-line-comment
test/cli/actions.test.ts 45 one-line-comment
test/scripts/release-pipeline-fixture.test.ts 25 one-line-comment
test/scripts/release-pipeline-fixture.ts 53 one-line-comment
test/sections/contract/validate-hook.test.ts 80 all-or-none
test/sections/teams/teams.test.ts 20 all-or-none
test/sections/teams/teams.test.ts 23 all-or-none
test/sections/teams/teams.test.ts 24 all-or-none
test/sections/teams/teams.test.ts 25 all-or-none
test/sections/teams/teams.test.ts 26 all-or-none
test/sections/teams/teams.test.ts 28 all-or-none
test/sections/teams/teams.test.ts 31 all-or-none
test/sections/teams/teams.test.ts 34 constant-spacing

Add the blank lines, make the comment one line directly above the item, comment every field or none, or list the path in .member-shape-allow.local with a # reason.

4 generated file(s) skipped.

Copilot AI 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.

🟢 Approval recommended

No active review issues are reported for the test-only notice expectation update.

No open issues 🎉

What changed in this PR

Updates a stale Pages end-to-end expectation to match the engine's notice formatting after #592 and #595 landed independently. Production behavior is unchanged.

Changes:

  • Removes the duplicate pages: prefix from the expected notice.
  • Keeps the no-POST/no-PUT checks, enablement advice, and permission explanation assertions intact.
File Description
test/​sections/​pages/​scenarios/​pages-enable-needs-build-type-or-source.yml Corrects the expected notice to include the section key once.

Review effort: Balanced

@Vivswan
Vivswan marked this pull request as ready for review November 12, 2026 05:03
@Vivswan
Vivswan merged commit 2eea08e into main Nov 12, 2026
29 checks passed
@Vivswan
Vivswan deleted the test/pages-notice-key-once branch November 12, 2026 05:39
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