Skip to content

fix: repair CI documentation contracts and regression fixtures - #71194

Merged
pelikhan merged 4 commits into
mainfrom
pelikhan-cuddly-happiness
Oct 22, 2026
Merged

pelikhan merged 4 commits into
mainfrom
pelikhan-cuddly-happiness

Conversation

@pelikhan

@pelikhan pelikhan commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Update work-queue documentation contracts and links after deployment/gallery relocation; compile linked repository workflows with isolated import fixtures.
  • Add missing Issue-projection diagnostics within the playbook size budget.
  • Fix native-delivery settings mocks and approval-expiry quota stubs; align dry-run tests with reserved job-name validation.
  • Modernize audit-diff embedded literals and split oversized functions without changing diff output.
  • Restrict gallery fallback to missing inline examples, preserve malformed/duplicate example failures, and cover verified-revision settings application.

ADR: ADR-71194: Validate Gallery Docs by Compiling Linked Repository Workflows

Validation

Passed:

  • make build, make fmt, make lint-cjs, and make test-guidance (24 tests).
  • Focused CLI/compiler regressions without ambient GitHub credentials.
  • Focused audit-diff regressions and race-detector cases.
  • Gallery/factory/persistent-memory integration tests and the live JSONL log-cache integration test.
  • make check-workflow-drift: all 346 workflows compile, with locks in sync.
  • Review follow-up: malformed/duplicate inline examples alongside repository links, inline and linked gallery compilation, and native-delivery missing/disabled/enabled settings cases.
  • CI-pinned golangci-lint v2.15.0 with --new-from-rev=origin/main: zero changed-code issues.

Limitation: make agent-report-progress remains blocked by existing modernization diagnostics in unchanged pkg/cli/audit_expanded.go and pkg/cli/audit_summary_build.go, plus an unknown-linter warning that prevents the gate from filtering those unrelated diagnostics. Custom Go lint, JavaScript lint, schema, and impacted-test stages passed. Earlier full-lint attempts timed out; remote CI has not been verified for the latest revision.

Modernize audit diff literals and split oversized diff functions without changing their output. Update documentation compilation coverage, queue synchronization fixtures, reserved-job assertions, and quota stubs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 22, 2026 18:13
Copilot AI max review requested due to automatic review settings October 22, 2026 18:13
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · gpt56 · 11.3 AIC · ⌖ 5.31 AIC · ⊞ 14.8K · ◷

Generated by Ponytail Reviewer for #71194

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · haiku45 · 5.23 AIC · ⌖ 8.08 AIC · ◇ 2.51 AIC · ⊞ 9.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Commit pushed: 8a1a622

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Request changes

The refactor replaces compilable DiffEntryBase: DiffEntryBase{Status: ...} initializers with promoted Status: keys. Go rejects promoted fields in keyed struct literals, so pkg/cli/audit_diff.go will not compile; please restore explicit embedded-field initialization at all affected sites.

The review is static; no repository commands or tests were executed.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · 1.94 AIC · ⌖ 0.547 AIC · ⊞ 1.6K
Comment /review to run again

Comments that could not be inline-anchored

pkg/cli/audit_diff.go:146

These composite literals use Status as if it were a declared field, but DomainDiffEntry embeds DiffEntryBase, so Go does not allow promoted fields in keyed struct literals; this makes the package fail to compile at every newly rewritten Status: literal in this file.

Content redacted to fit size limit.

@github-actions

Copy link
Copy Markdown
Contributor

🏗️ Design Decision Gate — ADR Required

This PR adds 283 new lines in business-logic directories (pkg/), which is over the 100-line threshold, but it does not link an Architecture Decision Record (ADR). It has no implementation label, no ADR link in the PR body, and no linked issue.

📄 Draft ADR committed: docs/adr/71194-validate-gallery-docs-by-compiling-linked-repository-workflows.md. Review and complete it before merging.

The draft records the main design choice inferred from the diff. Gallery docs now link to canonical repository workflows instead of embedding aw excerpts. Tests compile those linked workflows in isolated temporary .github/workflows fixtures (compileRepositoryExampleWorkflow in pkg/workflow/docs_examples_integration_test.go). The audit_diff.go refactor and the test-fixture fixes are noted as neutral consequences.

🔒 This PR cannot merge until an ADR is linked in the PR body.

📋 What to do next
  1. Review the draft ADR on your branch. It was generated from the PR diff.
  2. Complete the sections the agent could not infer. Confirm the deciders, refine the rationale, and correct the alternatives if needed.
  3. Commit the finalized ADR to docs/adr/ on your branch.
  4. Link the ADR in this PR body with a line such as:

    ADR: ADR-71194: Validate Gallery Docs by Compiling Linked Repository Workflows

After the ADR is linked in the PR body, this gate will run again and check that the implementation matches the decision.

📋 Michael Nygard ADR Format Reference

An ADR must contain these four sections:

  • Context: What is the problem, and what forces are at play?
  • Decision: What did you decide, and why?
  • Alternatives Considered: What else could have been done?
  • Consequences: What are the positive and negative trade-offs?

🏗️ ADR gate enforced by Design Decision Gate 🏗️ · pi · opus55 · 30.2 AIC · ⌖ 40.5 AIC · ⊞ 1.9K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd. This PR is primarily a regression-fixture repair; no blocking issues found. Two minor suggestions posted inline.

📋 Key Themes & Highlights

Key Themes

  • Reserved-job-name regression repaired: compiler_development_effects_validation_test.go and compiler_development_safety_test.go previously asserted that compiling a custom job named upload_assets (a reserved builtin name) succeeded and preserved an attacker-controlled BASH_ENV: ./unsafe.sh env override. This PR corrects those tests to expect the actual (and correct) jobs.upload_assets: this name is reserved rejection — this is a genuine /diagnosing-bugs fix for a prior test that masked a real validation gap.
  • audit_diff.go refactor is behavior-preserving: the DiffEntryBase flattening relies on Go's promoted-field composite-literal syntax, which is valid and compiles cleanly — verified locally. Function extraction (mcpToolsForDiff, appendMCPToolDiff, toolCallsForDiff, appendToolCallDiff, runSummaryDiffMetrics, setRunDurationDiff) is a clean, low-risk split.
  • New integration-test fallback (compileRepositoryExampleWorkflow in docs_examples_integration_test.go) silently drops the original extraction error when it falls back to regex-matched repository links — flagged inline since it weakens future diagnosability if both paths fail.
  • work_command_test.go adds ref-pinned settings verification but only covers the 404 path for aw.json; the 200/found path for settings application isn't exercised, flagged inline per /tdd.

Positive Highlights

  • ✅ Reserved-name test fix closes a real gap where a dangerous custom job override was silently accepted by test expectations.
  • ✅ health_approval_expiry_backfill_test.go adds a rateChecks counter assertion ensuring quota rechecking happens without live GitHub credentials — solid regression guard.
  • ✅ Large audit_diff.go diff preserves output format while meaningfully reducing duplication.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 76.8 AIC · ⌖ 16.3 AIC · ⊞ 10.2K
Comment /matt to run again

Comment thread pkg/cli/work_command_test.go Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The gallery validation fallback can suppress malformed inline-example errors and allow broken documentation to pass.

2 open issues
What changed in this PR

Repairs gh-aw documentation contracts and regression fixtures after the work-queue documentation relocation, alongside an audit-diff refactor.

Changes:

  • Refresh work-queue links, documentation checks, and Issue-projection diagnostic guidance.
  • Add isolated compilation fixtures for linked gallery workflows and repair CLI/compiler test mocks.
  • Extract audit-diff helpers and simplify literals, with no intended output changes.
File Description
specs/​work-queue/​README.md Update the native queue deployment link.
pkg/​workflow/​work_queue_persistent_memory_integration_test.go Check workflow links in the relocated gallery page.
pkg/​workflow/​docs_examples_integration_test.go Compile linked repository workflows with isolated import fixtures.
pkg/​workflow/​compiler_development_safety_test.go Expect reserved job-name rejection outside dry-run mode.
pkg/​workflow/​compiler_development_effects_validation_test.go Align restore-memory assertions with reserved job-name validation.
pkg/​cli/​work_command_test.go Mock verified default-revision settings lookup.
pkg/​cli/​health_approval_expiry_backfill_test.go Stub quota refreshes and verify rate-limit checks.
pkg/​cli/​audit_diff.go Extract comparison helpers and modernize struct literals.
actions/​setup/​js/​work_queue_documentation.test.cjs Update relocated paths, settings examples, and link checks.
.github/​aw/​debug-playbook.md Expand Issue-projection diagnostics within the size budget.

Review effort: Max

Comment thread .github/aw/debug-playbook.md Resolved
pelikhan and others added 2 commits October 22, 2026 11:32
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Clarify projection recovery guidance and finalize the gallery validation ADR.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

Copy link
Copy Markdown
Collaborator Author

Addressed the remaining review feedback in c0bd98e: gallery fallback now rejects malformed or duplicate inline examples, projection recovery guidance no longer assumes access failure, and the generated ADR is finalized and linked in the PR description. All four inline threads have been answered and resolved.

The older audit-diff compilation objection is declined: this repository requires Go 1.27.3, which supports these promoted-field literals; make build and focused audit-diff tests pass. Restoring the embedded literals would reintroduce the modernization diagnostics this PR fixes.

Changed-code lint is clean. The full publication gate remains blocked by existing modernization diagnostics in unchanged audit_expanded.go/audit_summary_build.go and an unknown-linter warning; its custom-lint, JavaScript, schema, and impacted-test stages pass.

@pelikhan
pelikhan merged commit a02442b into main Oct 22, 2026
67 checks passed
@pelikhan
pelikhan deleted the pelikhan-cuddly-happiness branch October 22, 2026 18:45
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.93.1

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