Skip to content

Fix runtime cache-memory cold-start reporting guidance - #74261

Merged
pelikhan merged 2 commits into
mainfrom
pelikhan/linter-cache-missing-data
Nov 3, 2026
Merged

pelikhan merged 2 commits into
mainfrom
pelikhan/linter-cache-missing-data

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Why

Linter Miner reported optional missing cache history as a workflow failure in #74179 even though its documented cold-start fallback allowed the task to continue. The runtime-injected cache prompts still required a missing-data report for every cache miss, contradicting the compiler-side guidance and documentation.

Approach

  • Align single-cache and multi-cache runtime prompts with the existing contract: use workflow-defined initialization or analysis fallbacks without reporting expected absence, and save updated state for future runs.
  • Preserve failure reporting for missing or unusable required inputs. Do not blanket-suppress explicit missing-data reports merely because no cache was restored.
  • Clarify that a successful restore does not guarantee every expected file exists. Fix an unbound {id} placeholder that broke rendering of the actual cache warning.
  • Extend regression coverage to runtime prompt templates, real warning rendering, and required-input reporting with and without a restore match. Update documentation and add a patch changeset.

The separate detection-engine error observed in the same run is not addressed here. Detection-gated cache publication remains unchanged.

Relates to #74179

Validation

  • make build
  • make fmt and make lint-cjs
  • Failure-handler suite: 646 tests passed
  • JavaScript typecheck and focused Go cache-prompt tests
  • make agent-report-progress: passed, including compilation of 355 workflows with no lock-file drift

Keep optional cache misses on the documented recovery path while preserving required-input reports. Cover runtime templates and real cache-warning rendering.

Co-authored-by: Copilot App <[email protected]>
@pelikhan
pelikhan marked this pull request as ready for review November 3, 2026 00:11
Copilot AI adaptive review requested due to automatic review settings November 3, 2026 00:11
@github-actions

github-actions Bot commented Nov 3, 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 · routed: gpt56 max · ~3 AIC · ⌖ ~1 AIC · ⊞ 118 · ◷

Generated by Ponytail Reviewer for #74261

@github-actions

github-actions Bot commented Nov 3, 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 Nov 3, 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.

Design Decision Gate 🏗️

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 Design Decision Gate 🏗️ · routed: opus55 medium · ~12 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 3, 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 Nov 3, 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 · ~6 AIC · ⌖ ~15 AIC · ⊞ 9.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-03T00:15:24Z
review_event: REQUEST_CHANGES
top_themes:
  - stale runtime prompt copies cause a deterministic Go test failure
files_reviewed:
  - pkg/workflow/cache_memory_prompt_test.go
  - pkg/workflow/prompts/cache_memory_prompt.md
  - pkg/workflow/prompts/cache_memory_prompt_multi.md
  - actions/setup/js/handle_agent_failure.cjs
  - actions/setup/js/handle_agent_failure.test.cjs
comment_count: 1

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K · ◷
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.

Request changes

The added Go contract test reads committed runtime prompt copies that this PR leaves stale, producing a deterministic test failure and allowing source/runtime template drift. Please synchronize those copies or narrow the test to the authoritative templates.

Details

One inline comment identifies the failing assertion path in pkg/workflow/cache_memory_prompt_test.go. The specialist pass also flagged that the cold-start behavior remains prompt-dependent, but I did not treat that as a separate blocking finding because preserving explicit missing-data reporting appears intentional in this change.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review to run again

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.

🟢 Approval recommended

No active review issues remain with the runtime cache-memory guidance changes.

No open issues 🎉

What changed in this PR

Aligns runtime cache-memory guidance with the existing cold-start contract, addressing the false failure reported in #74179 while preserving reporting for missing or unusable required inputs.

Changes:

  • Updates single-cache and multi-cache prompts to use workflow-defined fallbacks and save updated state.
  • Clarifies restore-match warnings and logs, and fixes the warning’s unbound {id} placeholder.
  • Adds regression coverage, documentation updates, and a patch changeset.
File Description
pkg/​workflow/​cache_memory_prompt_test.go Extends contract checks to runtime prompt templates.
docs/​src/​content/​docs/​reference/​cache-memory.md Clarifies cold-start fallbacks and required-input reporting.
actions/​setup/​md/​cache_memory_prompt.md Aligns single-cache instructions with fallback behavior.
actions/​setup/​md/​cache_memory_prompt_multi.md Applies the same guidance to multiple caches.
actions/​setup/​md/​cache_memory_miss.md Clarifies restore warnings and fixes the cache-ID placeholder.
actions/​setup/​js/​handle_agent_failure.test.cjs Covers real warning rendering and required-input reporting.
actions/​setup/​js/​handle_agent_failure.cjs Updates comments and logs without changing failure-detection logic.
.changeset/​patch-runtime-cache-cold-start-guidance.md Records the guidance correction as a patch release.

Review effort: Balanced (auto)

@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 /tdd and /diagnosing-bugs to the report_missing_data contract change. Requesting changes because one committed test will fail.

📋 Key Findings

Blocking

  • Stale snapshot: actions/setup/js/testdata/messages_preview.md (around line 568) still contains the old Cache Configuration Problem text for cache_memory_miss.md. messages_preview.test.cjs renders every actions/setup/md template that is not in its exclusion list and asserts toMatchFileSnapshot, and cache_memory_miss.md is not excluded. The test renders synthetic previews of every published message template will fail until the snapshot is regenerated and committed.

Non-blocking

  • Docs placeholder: docs/src/content/docs/reference/cache-memory.md lines 96 and 135 still use {id}, while the warning template now uses <id>. Align them.
  • Duplicate prompt sources: see the inline comment on pkg/workflow/cache_memory_prompt_test.go.

Positive Highlights

  • ✅ Changing {id} to <id> avoids the unrendered-placeholder assertion. That is the right fix.
  • ✅ The new it.each test in handle_agent_failure.test.cjs covers the restored and unrestored branches.
  • ✅ The new main() log is informational only, and the gating logic is unchanged.

Verification Limits

  • The vitest suite could not run locally because npm registry TLS interception blocked npm ci. The snapshot finding comes from static analysis of the test. The focused Go contract tests pass locally.

@copilot please address the review comments above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~1 AIC · ⊞ 5.4K
Comment /matt to run again

Remove unused compiler-side cache prompt copies and validate the runtime templates directly. Refresh the cache warning snapshot and align documented named-cache placeholders.

Co-authored-by: Copilot App <[email protected]>
@pelikhan
pelikhan merged commit 7a9edd0 into main Nov 3, 2026
67 checks passed
@pelikhan
pelikhan deleted the pelikhan/linter-cache-missing-data branch November 3, 2026 00:58
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.0

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