Repository navigation
Make smoke token telemetry checks engine-aware - #65403
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
✅ PR Code Quality Reviewer completed the code quality review. Unable to emit PR review actions from this environment after a safeoutputs write permission failure.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft. Warning Threat Detection Engine Failure — The analysis engine could not complete. This is a tooling failure, not a security finding. What happenedThe threat detection engine failed to produce results. Review the workflow run logs for details.
|
|
✅ Ponytail Reviewer completed successfully! Lean already. Ship.
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The unrelated skill edit removes explicit routing for durable work-queue requests.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Makes shared smoke-test telemetry checks engine-aware while ensuring missing agent artifacts fail explicitly.
Changes:
- Skips proxy-token assertions for Kiro, Goose, and Cursor with an informational notice.
- Regenerates all importing workflow locks.
- Adds regression coverage for engine conditions and artifact handling.
| File | Description |
|---|---|
.github/workflows/shared/token-telemetry-check.md |
Adds engine-aware assertions and strict artifact downloading. |
pkg/workflow/token_telemetry_check_test.go |
Tests generated telemetry checks across four engines. |
.github/workflows/smoke-test-tools.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-temporary-id.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-service-ports.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-project.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-opencode.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-kiro.lock.yml |
Skips unsupported proxy assertions for Kiro. |
.github/workflows/smoke-goose.lock.yml |
Skips unsupported proxy assertions for Goose. |
.github/workflows/smoke-gemini.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-deepseek-harness.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-cursor.lock.yml |
Skips unsupported proxy assertions for Cursor. |
.github/workflows/smoke-crush.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-copilot.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-copilot-arm.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-copilot-aoai-entra.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-copilot-aoai-apikey.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-codex.lock.yml |
Regenerates imported telemetry job. |
.github/workflows/smoke-claude.lock.yml |
Regenerates imported telemetry job. |
.github/skills/agentic-workflows/SKILL.md |
Reorders work-queue guidance but drops its routing entry. |
| - `.github/aw/update-agentic-workflow.md` | ||
| - `.github/aw/upgrade-agentic-workflows.md` | ||
| - `.github/aw/visual-regression.md` | ||
| - `.github/aw/work-queue.md` |
Comment MemoryNote This comment is managed by comment memory.It stores persistent context for this thread in the code block at the top of this comment.
|
There was a problem hiding this comment.
Verdict
COMMENT — the engine-aware gating looks reasonable, but the new regression test is brittle because it asserts exact generated YAML formatting and job adjacency instead of the check_token_telemetry semantics.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 41 AIC · ⌖ 7.12 AIC · ⊞ 20.2K
Comment /review to run again
Comments that could not be inline-anchored
pkg/workflow/token_telemetry_check_test.go:109
This test is coupled to the current lockfile formatting, so a harmless job reorder or YAML emitter change will fail CI even when the telemetry behavior is still correct.
<details><summary>💡 Why this matters</summary>
strings.SplitN(..., " conclusion: ", 2) assumes conclusion is always the next job, and the later Contains/Count checks depend on exact whitespace and list ordering. That makes the regression coverage noisy because unrelated compile changes can break the test.
A more s…
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /codebase-design and /tdd — the core fix is sound (engine-aware conditionals, hard artifact-download failure, regression test), but flagged maintainability gaps plus one scope-creep item.
📋 Key Themes & Highlights
Key Themes
- Duplicated magic list: the
["kiro","goose","cursor"]unsupported-engine list is a raw string literal repeated 3× intoken-telemetry-check.mdwith no single source of truth, instead of leveraging the existingEngineCapabilities/EnginesWithCapabilityregistry pattern used elsewhere in the compiler. - Brittle regression test:
token_telemetry_check_test.goasserts on exact YAML string/indentation snippets from generated lock files rather than compiling and inspecting structured output, making it fragile to incidental formatting changes. - Unrelated change: the
SKILL.mdreordering ofwork-queue.mdis out of scope for this PR's stated purpose.
Positive Highlights
- ✅ Removing
continue-on-error: trueon the artifact download so missing artifacts now fail loudly instead of silently skipping assertions — directly fixes the regression described in the PR body. - ✅ Good root-cause framing: distinguishing "no proxy telemetry for this engine" (expected, now reported via
::notice::) from "telemetry emitter broken" (real failure). - ✅ New regression test exercises all 4 engines (kiro, goose, cursor, copilot) and would have caught the original bug.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 113.2 AIC · ⌖ 13.6 AIC · ⊞ 10K
Comment /matt to run again
|
|
||
| - name: Assert token_usage.jsonl is non-empty | ||
| if: steps.download-agent.outcome == 'success' | ||
| if: steps.download-agent.outcome == 'success' && !contains(fromJSON('["kiro","goose","cursor"]'), needs.activation.outputs.engine_id) |
There was a problem hiding this comment.
[/codebase-design] The set of engines without proxy token telemetry (["kiro","goose","cursor"]) is duplicated as a raw string literal 3 times in this file, with no single source of truth. If a new engine lacking proxy telemetry is added, or kiro/goose/cursor later gain telemetry, every occurrence must be updated in lockstep and the compiled lock files regenerated — easy to miss.
💡 Suggested approach
The codebase already has an EngineCapabilities struct (pkg/workflow/agentic_engine.go) and EnginesWithCapability(predicate) registry helper used to build "registry-driven lists of supported engines" elsewhere. Consider adding a ProxyTokenTelemetry bool capability field, then have the compiler inject the resulting engine-ID list into this shared workflow template (e.g. via a compiler-rendered {{ ... }} placeholder) instead of hardcoding it in the .md source. This keeps the list correct automatically as engines evolve, matching the stated purpose of EnginesWithCapability.
@copilot please address this.
| - `.github/aw/work-queue.md` | ||
| - `.github/aw/workflow-constraints.md` | ||
| - `.github/aw/workflow-editing.md` | ||
| - `.github/aw/workflow-patterns.md` |
There was a problem hiding this comment.
[/grill-with-docs] This skills-ordering tweak (reordering work-queue.md and adding it to the "After loading" bullet list) is unrelated to the PR's stated purpose of making smoke token telemetry checks engine-aware.
💡 Suggested approach
Unrelated doc/skill changes bundled into a focused bug-fix PR make the diff harder to review and the git history harder to bisect later. If this was an unintentional rebase artifact, drop it from this PR; if intentional, split it into its own PR so the token-telemetry fix stays a clean, reviewable unit.
@copilot please address this.
| "Report engines without proxy token telemetry", | ||
| } { | ||
| if !strings.Contains(check, expected) { | ||
| t.Errorf("token telemetry check missing %q", expected) |
There was a problem hiding this comment.
[/tdd] This test asserts on exact literal YAML substrings (indentation, step names, strings.Count on a hardcoded expression string) extracted from generated .lock.yml files rather than compiling the shared .md source directly and inspecting structured output. Any cosmetic change to the compiler's YAML formatting (e.g. indentation width, step ordering) will break this test even though behavior is unchanged.
💡 Suggested approach
Prefer compiling token-telemetry-check.md in-memory (as other shared-component tests do, e.g. TestCheckoutImportFromSharedWorkflow in checkout_import_test.go) and asserting on the compiler's own job/step model, or at minimum parse the YAML into a struct and assert on needs, if, and step names/conditions as data rather than raw string contains/counts. This decouples the regression test from incidental formatting of 15+ generated lock files.
@copilot please address this.
There was a problem hiding this comment.
Reviewed with Impeccable audit + harden modes (infra/CI change, no UI).
Summary: The engine-aware gating logic is correct and consistent across all 19 regenerated lock files. Verified:
- All 17 workflows importing
token-telemetry-check.mdalready define anactivationjob, so the newneeds: [agent, activation]dependency is safe everywhere. continue-on-error: trueon the artifact download is intentionally removed per the PR description (fail fast instead of silently skipping assertions) — correct behavior change.contains(fromJSON('["kiro","goose","cursor"]'), needs.activation.outputs.engine_id)correctly gates both proxy assertions (negated) and the new notice step (non-negated), andengine_idis a realactivationjob output (steps.generate_aw_info.outputs.engine_id).- Recompiling
smoke-kiro.mdreproduces the committed lock file byte-for-byte, confirming no stale/drifted lock files. - New Go test
TestSmokeTokenTelemetryCheckIsEngineAwarepasses and correctly asserts the gating/notice/no-continue-on-error invariants across kiro, goose, cursor, and copilot.
No blocking issues found. Minor non-blocking note: the ["kiro","goose","cursor"] engine list is repeated 3 times per generated job (once per if: condition) since GitHub Actions if: expressions can't share a named value — this is inherent to the platform, not a defect, so no action needed.
🧵 Reviewed using Impeccable skills by Impeccable Skills Reviewer · copilot · sonnet50 · 129.1 AIC · ⌖ 14 AIC · ⊞ 8.1K
|
@copilot resolve the merge conflicts on this branch. |
|
@copilot resolve the merge conflicts on this branch. |
…en-telemetry # Conflicts: # .github/workflows/smoke-copilot-aoai-entra.lock.yml Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Merged |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
…en-telemetry Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Merged the latest |
|
🎉 This pull request is included in a new release. Release: |

Kiro, Goose, and Cursor smoke workflows can succeed without proxy token records, but the shared
check_token_telemetryjob treats missing records as a failure.