Restore token workflow behavior after agentic-ops bundle sync#30533
Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f8394d5c-c48b-432a-a586-69873c87b045 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/f8394d5c-c48b-432a-a586-69873c87b045 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
|
@copilot Do not restore shared code for repo memory, but instead use the advanced configuration options (https://github.github.com/gh-aw/reference/repo-memory/#advanced-configuration) to achieve the same thing. |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/914a411e-783c-4c6a-94df-6557d5cb3991 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Updated in f96235f. I removed the shared Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Remove |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5dff3a5a-6344-4241-b742-270de95949ca Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/5dff3a5a-6344-4241-b742-270de95949ca Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Removed in caa52b2. I dropped the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Compare current workflows to previous workflows in the repo before SHA 9a37d68, before they were refactored out and still existed as individual workflows in this repo under .github/workflows/ dir copilot-token-optimizer.md and copilot-token-audit.md. Provide a table of safe outputs as well as markdown text that was changed in the refactoring and do a deep analysis on what changed. Workflows should still be equivalent in functionality within the new bundle. Provide suggestions on what to change in case you find any discrepancies. You may also analyze their actions run data. |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4d116e04-b299-4134-a0dd-4feee648764e Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Compared current Safe outputs:
Markdown / prompt changes:
Deep analysis:
Run data:
At this point I don’t see another functional discrepancy that should be changed unless we explicitly want to reintroduce chart generation without using Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Refactor to remove shared |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/b4bd9313-b03c-40a8-8778-efe58ca7d730 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
|
@copilot Recheck by comparing results from current workflow runs https://github.com/github/gh-aw/actions/runs/25423246309, https://github.com/github/gh-aw/actions/runs/25423304113 to runs from previous workflows in the repo before SHA 9a37d68. |
Rechecked against the closest pre-refactor successful runs: optimizer Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot For 1, we want to keep upload_asset and chart images but without having an extra import. For 2, investigate more why the 24h was empty. |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/df59998e-0e7b-47d0-b14b-889fedbcf656 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/df59998e-0e7b-47d0-b14b-889fedbcf656 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/df59998e-0e7b-47d0-b14b-889fedbcf656 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/df59998e-0e7b-47d0-b14b-889fedbcf656 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/df59998e-0e7b-47d0-b14b-889fedbcf656 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Addressed in caa4561 (with prompt clarifications through 5586449). Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Recheck by comparing results from current workflow runs https://github.com/github/gh-aw/actions/runs/25431203557, https://github.com/github/gh-aw/actions/runs/25431220498 to runs from previous workflows in the repo before SHA 9a37d68. |
Rechecked against the pre-refactor successful runs: optimizer Current optimizer run Current audit run The deeper finding is that the empty-data problem is upstream of the audit prompt itself: both the new audit and the new optimizer saw empty pre-downloaded telemetry before the agent started its analysis. I also confirmed GitHub had many workflow runs in the same time window, so the empty result is coming from the shared |
|
@copilot Fix matplotlib/seaborn issue. |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/9391579e-2f14-4b23-9d4c-ea831ce0bf12 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/9391579e-2f14-4b23-9d4c-ea831ce0bf12 Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Fixed in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Restores the pre-refactor behavior of the bundled Copilot token audit/optimizer workflows by re-aligning repo-memory usage, publishing semantics, authentication, and inlining previously shared bundle content.
Changes:
- Reconnect both workflows to the shared repo-memory branch
memory/token-auditwith restored size limits and consistent shared-state descriptions. - Restore audit output behavior to publish via
create-discussionin theauditscategory (with asset uploads for charts), while keeping the optimizer’s issue-based publishing. - Inline previously shared bundle content (prompt/reporting guidance, OTLP observability config/guidance, Python chart setup) and recompile the generated
.lock.ymlworkflows.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/copilot-token-optimizer.md | Updates optimizer repo-memory config to use the shared memory/token-audit branch and restores report-formatting guidance inline. |
| .github/workflows/copilot-token-optimizer.lock.yml | Regenerated compiled workflow to reflect updated repo-memory constraints/branch and prompt content. |
| .github/workflows/copilot-token-audit.md | Restores audit discussion publishing + asset uploads, shared repo-memory settings, OTLP observability guidance, and local Python chart setup. |
| .github/workflows/copilot-token-audit.lock.yml | Regenerated compiled audit workflow reflecting restored discussion publishing, repo-memory settings, OTLP wiring, and removal of shared imports/cache-memory jobs. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 1
| const fs = require('fs'); | ||
| const assignmentsFile = '/tmp/gh-aw/experiments/assignments.json'; | ||
| if (fs.existsSync(assignmentsFile)) { | ||
| const assignments = JSON.parse(fs.readFileSync(assignmentsFile, 'utf8')); | ||
| const names = Object.keys(assignments).sort(); | ||
| if (names.length > 0) { | ||
| const attrs = { 'gh_aw.experiment.names': names.join(',') }; | ||
| for (const name of names) { | ||
| attrs[`gh_aw.experiment.${name}`] = assignments[name]; | ||
| } | ||
| const otlp = require('/tmp/gh-aw/actions/otlp.cjs'); | ||
| await otlp.logSpan('experiment', attrs); | ||
| } | ||
| } |
The bundled
copilot-token-auditandcopilot-token-optimizerworkflows diverged from their pre-refactor behavior ingh-aw. The main regressions were broken shared repo-memory state, an audit publishing mode change from discussion to issue, and prompt/auth drift introduced during the bundle refactor.Restore shared state contract
memory/token-auditrepo-memoryconfiguration in each workflow instead of restoring the shared importRestore audit publishing semantics
create-discussion-based output in theauditscategory, including the prior title prefix and fallback behaviorKeep optimizer behavior aligned
Remove the shared Python dataviz dependency from the audit workflow while keeping visual output parity
shared/python-dataviz.mdfromcopilot-token-auditupload_assetpublishing directly in the audit workflow so discussion output still includes chart images without a shared importRestore remaining prompt and auth parity
copilot-requestsfeature so the compiled workflow matches the previous authentication behaviorreporting.mdand optional shared-instructions dependenciesHarden empty-window audit handling
.runsarray and a window with runs but no completed runsrolling-summary.jsoninstead of appending a synthetic zero day when the 24h collection window is emptyRecompile generated workflows
.lock.ymlfiles so compiled workflow behavior matches the restored markdown sources