Repository navigation
Check literal engine cooldowns at compile time and allow zero days - #80476
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
✅ Ponytail Reviewer completed successfully!
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The No-op messageSpecification review completed for PR #80476 at head d889804; no applicable normative contract regression or eligible specification update was identified.
|
This comment has been minimized.
This comment has been minimized.
|
✅ Test Quality Sentinel completed test quality analysis.
|
|
✅ PR Code Quality Reviewer completed the code quality review. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. The No-op messageCompleted PR #80476 review: submitted two inline findings and a REQUEST_CHANGES review; review outcome recorded in review-history.
|
There was a problem hiding this comment.
What this change does: It checks literal engine release ages during compilation and allows a zero-day cooldown. It keeps runtime checks for dynamic Copilot versions.
Should fix
- The imported engine JSON parser repeats validation already provided by
json.Unmarshal. Restoring the original call removes the extra decoder and preserves rejection of trailing values. See the inline comment.
Verdict: Ship after simplifying the parser.
Not checked: The local Go documentation command could not download its toolchain because TLS verification failed.
Lean: -5 lines possible.
Generated by ✂️ Ponytail Reviewer for #80476 · codex · routed: gpt61 medium · ~6 AIC · ⌖ ~1 AIC · ⊞ 176
Comment /ponytail to run again
Comment MemoryPeek at saved memory (spec-review-history)History |
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (>100 new lines) but does not have a linked Architecture Decision Record (ADR). 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify that the implementation matches the decision. 🔁 Related ADR: divergence to resolveThe draft revises ADR-73829 (link unavailable: invalid HTTPS URL) in two places: runtime metadata verification for literal Copilot versions, and the rule that References: §45228691513
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Found two blocking correctness/performance concerns in the release metadata path:
- npm packuments are fully buffered behind an 8 MiB cap, so larger supported packages fall back to warning-only validation and never enforce cooldown.
- The shared cache lock is held during the network request, serializing concurrent compiler lookups behind the 5-second timeout.
Inline comments identify the affected lines and remediation direction.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review to run again
Comment MemoryPeek at saved memory (review-history)History |
🧪 Test Quality Sentinel Report✅ Test Quality Score: 90/100 — Excellent
📊 Metrics (11 new tests)
|
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs, /tdd, and /codebase-design (skill selection from the pr-triage output). No blocking defects found; the compile-time cooldown design is sound. Six focused inline comments follow.
📋 Key Themes & Highlights
Key Themes
- Fail-open runtime gap: literal Copilot versions skip the runtime cooldown, so a failed compile-time lookup leaves them unchecked (warning only).
- Concurrency: the cache lock is held across a 5 s network fetch, serializing concurrent compiles.
- Vestigial API and duplication: the
strictparameter is unused, and npm package names are duplicated across engines. - Test hygiene:
requireruns inside an HTTP callback off the test goroutine.
Positive Highlights
- ✅ Compile-time and installer version resolution share helpers, so the validated version matches the installed one.
- ✅ Network safety is well covered: redirects rejected, no auth header, bounded body, and timeouts.
- ✅ Dynamic versions keep runtime enforcement, and docs and schema were updated consistently.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~12 AIC · ⌖ ~2 AIC · ⊞ 7.1K
Comment /matt to run again
There was a problem hiding this comment.
✅ Test Quality Sentinel: 87/100. 0% implementation tests (threshold: 30%). No guideline violations. Correction to the posted report: edge/error coverage is 10/11 (TestCopilotLiteralCooldownRuntimePolicy has no error case), so the score is 87, not 90.
🧪 Test quality analysis by Test Quality Sentinel · copilot · routed: haiku55 xhigh · ~6 AIC · ⌖ ~2 AIC · ⊞ 7.4K
Comment /review to run again
There was a problem hiding this comment.
🟡 Changes recommended
Outdated Copilot golden expectations break existing tests, while cooldown resolution gaps can leave the releases actually installed unchecked.
7 open issues
Update golden fixtures for zero-day Copilot cooldowns · New Reset cloned detector settings before validating inline cooldown · New Resolve npm package from the behavior-defined engine · New Resolve alias install versions from the catalog runtime · New Warn users to check every applicable engine cooldown · New Include browser metadata warnings in the Wasm response · New Prevent compiler CLI tests from making live metadata requests · New
What changed in this PR
This PR adds literal engine release-age checks to gh-aw’s compiler, avoiding Copilot runtime metadata lookups that can reject Enterprise-issued tokens.
Changes:
- Validate literal and default releases using cached public publication metadata, with manual-validation warnings when lookup fails.
- Disable runtime cooldown lookups for literal Copilot versions while retaining dynamic-version enforcement and checksum protections.
- Allow
engine.cooldown: 0in strict mode and update tests, schema descriptions, and documentation.
| File | Description |
|---|---|
pkg/workflow/test_main_test.go |
Stubs release metadata for unrelated workflow tests. |
pkg/workflow/engine.go |
Adds an explicit single-value JSON check and updates the cooldown comment. |
pkg/workflow/engine_release_cooldown.go |
Implements release targeting, metadata lookup, caching, and age validation. |
pkg/workflow/engine_release_cooldown_test.go |
Tests metadata handling, caching, detector targets, and installer policy. |
pkg/workflow/engine_cooldown.go |
Allows zero cooldown regardless of strict mode. |
pkg/workflow/engine_cooldown_test.go |
Updates validation, inheritance, and import tests. |
pkg/workflow/copilot_installer.go |
Disables runtime cooldown checks for literal versions. |
pkg/workflow/compiler_validators.go |
Integrates release-age validation and updates migration guidance. |
pkg/workflow/compiler_types.go |
Adds metadata cache, client, clock, and warning state. |
pkg/parser/schemas/main_workflow_schema.json |
Clarifies zero-cooldown behavior in schema descriptions. |
docs/src/content/docs/reference/frontmatter-full.md |
Updates cooldown comments in generated examples. |
docs/src/content/docs/reference/engines.md |
Documents compile-time checks, fallback warnings, and runtime policy. |
.changeset/patch-compile-engine-release-cooldown.md |
Records the user-facing changes for release notes. |
Review effort: Max (adaptive)
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "97ba3453c5fdd9222d66d78878d4f2ec2b374676",
"kind": "requested",
"schema_version": "1",
"state": "23c8781d7a2f9f3437722e1cbdfadebf92476b9309893e69880153de5666f337",
"work": [
"02defc190f21b65ebd2083f5a242d6e80805ea3e2c67e7c4f793e10c92fa80e5",
"156e88f62431362c30f5c8d502db644a05bb591153a4407b9cbf0e9dd2a7b00b",
"18a42ed42f117d8391f43386d127ee497e2a654b6f648c3846a0745b0bf3e109",
"24d30678a642b1ebdcf39c7189fed08b2a745c6cbd2c09fd2e2ff8e51b96867d",
"2fa3af697b7b9124ccfe29824b5a4bbbbc67ff128b442d86ea8d29a89a08bd62",
"3906eebb6daffe07b3d89605477e0da42af0346336c85435345ac96821d1767b",
"398a4f782431a786e28f98811452836781cd6d974b0cc23030d6ceda96bf059a",
"40ebe5816c55e69a4a31426bc6a77c7ad86b32a6c84cd9973610c72661b43658",
"7032ddd8a7afcbc95f10e20c4c3da31212b2dcd06303e5039c1c9f7e1f319f40",
"7ab0402530fd03d1a54d7b8eead5f7e3b2a4dbdf5f84a7fd27a54427bf9cbd89",
"7dba78855428ac3f53f6f853bfe4a590da0ca3bedbf22c85686f91919c081b5a",
"8724480f4d227138d156f842492fce8375560194e6d2622219de75288f282f4a",
"8acb61a077717e3a460018aacdfde96fd489f77606cd36169e2328d9079b75bb",
"b43fb8ec68d1f38baa4a23192ad912b6090b6504fdbc4d0ec18dc9da1533c1a7",
"b9520d5035377fd09d4abbc4db9c42af626483bf57bed9a487f2a18d646273ec",
"c4c2ca5ba9c8dbfb8dae63c3ab631fbb1cc43c8b38fa12bee55e19db7261eba7",
"c74b5e239e6f4fe8b4605806ded4f0504ff59d412ad453e03d99a34e92b226a5",
"ebba1adc9d750f02fd3bfd40e5d151a3e9ab5d9602c358eb595a8223d5ebc0f6"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
…wn-mechanism Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
- Stream npm packuments to extract only time[version] - Release cache lock during metadata lookups - Share engine npm package name constants - Resolve alias, prefix-alias, and inline-detector targets like the installer - Clarify failed-lookup warning to cover every applicable cooldown - Drop unused strict parameter and json.Decoder in engine.go - Deterministic release lookups in pkg/cli tests - Document compile-time-only tradeoff for literal Copilot versions - Regenerate golden fixtures and lock files Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ment Copilot cooldown tradeoff Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… spec (1.0.108) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Copilot’s runtime cooldown lookup can reject Enterprise-issued tokens. Move literal-version checks to compilation and allow zero cooldown in strict mode.