Skip to content

Astryx surface inventory check is one-directional and not wired into CI #3064

Description

@Astro-Han

While addressing review feedback on #3033, two independent drifts surfaced in docs/astryx-surface-file-inventory.{md,paths}, both from the same gap.

What is wrong

scripts/check-astryx-surface-inventory.mjs asserts that every product surface file on disk appears in the inventory. It never asserts the reverse. A row for a file that has been deleted survives the check indefinitely.

It is also not referenced from package.json or .github/workflows/ci.yml, so it does not run on its own. Nothing enforces the inventory at all today.

What that let through

Found on main as of 820a47b:

  • docs/astryx-surface-file-inventory.md carried rows for apps/desktop/src/renderer/external-session-import-dialog.tsx and apps/desktop/src/renderer/styles/external-session-import.css after both were deleted. The .paths half had been updated by hand; the Markdown half had not, so the two halves disagreed.
  • Three files that arrived on main were never listed in either half: apps/desktop/src/renderer/settings/runtime-host-profiles-section.tsx, apps/desktop/src/renderer/settings/runtime-host-ssh-terminal-dialog.tsx, and apps/desktop/src/renderer/styles/settings/runtime-host.css. This is the direction the check does cover — it simply was not running.

Both are corrected in #3033 (322a9ce) by running scripts/generate-astryx-surface-inventory.mjs rather than editing either half by hand. That fixes the current state, not the gap.

Proposed change

  1. Make check-astryx-surface-inventory.mjs fail on inventory rows with no file on disk, in both .paths and the Markdown table, so the check is symmetric.
  2. Prefer asserting that the generator output matches the committed files byte-for-byte over re-implementing the comparison. These are generated artifacts; "regenerate and diff" is a stronger and simpler invariant than a list of hand-written rules, and it also catches column drift the current check ignores.
  3. Add an npm script and wire it into the changes-gated CI path so it runs when surface files move.

The hand-editing is the root cause: a generated file maintained in halves drifts in whichever half the author forgets. A check that only runs one direction and only when someone remembers to run it cannot catch that.

Generated-by: Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesthelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions