Skip to content

fix: use scratchpad/architecture.md as cache source of truth for architecture diagram#28422

Merged
pelikhan merged 2 commits intomainfrom
copilot/fix-cache-architecture-diagram
Apr 25, 2026
Merged

fix: use scratchpad/architecture.md as cache source of truth for architecture diagram#28422
pelikhan merged 2 commits intomainfrom
copilot/fix-cache-architecture-diagram

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 25, 2026

The architecture diagram workflow could incorrectly noop even when scratchpad/architecture.md was empty or stale, because the noop gate only checked last_commit in the cache — not whether the diagram file actually existed with content.

Changes

  • Removed last_diagram from architecture-state.json — cache now stores only last_commit and package_map; the diagram lives in scratchpad/architecture.md
  • Noop condition now gates on scratchpad/architecture.md — requires the file to exist with diagram content in addition to no Go file changes since last_commit
  • Updated cache writearchitecture-state.json no longer includes last_diagram field

Before

{
  "last_commit": "<sha>",
  "last_diagram": "<full ASCII diagram>",
  "package_map": { ... }
}

After

{
  "last_commit": "<sha>",
  "package_map": { ... }
}

The noop path now skips only when: no .go changes since last_commit AND scratchpad/architecture.md exists with diagram content.

- Remove last_diagram from architecture-state.json cache
- Add check for scratchpad/architecture.md existence with content as part of noop condition
- Recompile lock file

Agent-Logs-Url: https://github.com/github/gh-aw/sessions/6211b5ec-785b-4942-800b-e7903d989608

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix caching issue in daily architecture diagram workflow fix: use scratchpad/architecture.md as cache source of truth for architecture diagram Apr 25, 2026
Copilot AI requested a review from pelikhan April 25, 2026 10:48
@pelikhan pelikhan marked this pull request as ready for review April 25, 2026 10:49
Copilot AI review requested due to automatic review settings April 25, 2026 10:49
@pelikhan pelikhan merged commit 5080878 into main Apr 25, 2026
19 checks passed
@pelikhan pelikhan deleted the copilot/fix-cache-architecture-diagram branch April 25, 2026 10:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the daily architecture diagram generator workflow spec so the cache no-op behavior depends on the presence of a valid diagram in scratchpad/architecture.md, rather than relying on a cached last_diagram field.

Changes:

  • Remove last_diagram from the documented architecture-state.json schema (cache now stores last_commit and package_map only).
  • Update the no-op gate to require scratchpad/architecture.md to exist and contain diagram content.
  • Update the documented cache write example to match the new schema.
Show a summary per file
File Description
.github/workflows/daily-architecture-diagram.md Aligns the workflow spec’s cache schema and no-op logic with scratchpad/architecture.md as the diagram source of truth.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@github-actions github-actions Bot mentioned this pull request Apr 25, 2026
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.

[q] fix: use scratchpad/architecture.md as cache source of truth

3 participants