Skip to content

fix(ci): register release-notes with moon and fix its manifest path spread (RIG-3731) - #1174

Merged
trunk-io[bot] merged 3 commits into
mainfrom
compass-repo/rig-3731-register-release-notes
Sep 13, 2026
Merged

fix(ci): register release-notes with moon and fix its manifest path spread (RIG-3731)#1174
trunk-io[bot] merged 3 commits into
mainfrom
compass-repo/rig-3731-register-release-notes

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 2 PRs:

  1. main
  2. "fix(ci): register release-notes with moon and fix its manifest path spread (RIG-3731)" (this PR)
  3. fix(release): carry release-image's resolved digest to the notes generator (RIG-3731) #1190

tools/release-notes carried a moon.yml with typecheck/test/ci tasks but was
absent from .moon/workspace.yml. moon discovers projects only from that explicit
map, so the project was invisible — moon project release-notes returned
project_graph::unknown_id, and its 22 tests and typecheck had NEVER run in CI,
while the release lane depends on it to generate the Release body appendix and
the nix-outputs.json manifest. This is the same hazard the macos-bundle entry
already warns about in situ: an unregistered tool is silently inert and ships
untested.

Registering it immediately surfaced a real defect the missing gate had hidden:

index.ts(312,49): error TS2783: 'path' is specified more than once, so this
usage will be overwritten.

In the keyed form of nix path-info --json, the object KEY is the authoritative
store path, but it was spread BEFORE the value, so a path field inside the
value would overwrite it and record a wrong store path in the manifest. Spread
the value first and let the key win. Not a type silencer — it corrects which
store path the manifest reports.

Audited the whole repo: release-notes was the only unregistered tool project, so
this gap is isolated rather than systemic.

Verified: moon project release-notes resolves (was unknown_id); moon run release-notes:ci is green — 22 pass / 0 fail, typecheck clean (was exit 2); the
generator's --dry-run emits 8 named nix outputs each with a narHash and real
/nix/store paths; biome clean; sea-ref-gate and orion-ref-gate clean.

Ledger-impact: none — CI project registration and a local bug fix.

Refs RIG-3731

…pread (RIG-3731)

tools/release-notes carried a moon.yml with typecheck/test/ci tasks but was
absent from .moon/workspace.yml. moon discovers projects only from that explicit
map, so the project was invisible — `moon project release-notes` returned
project_graph::unknown_id, and its 22 tests and typecheck had NEVER run in CI,
while the release lane depends on it to generate the Release body appendix and
the nix-outputs.json manifest. This is the same hazard the macos-bundle entry
already warns about in situ: an unregistered tool is silently inert and ships
untested.

Registering it immediately surfaced a real defect the missing gate had hidden:

  index.ts(312,49): error TS2783: 'path' is specified more than once, so this
  usage will be overwritten.

In the keyed form of `nix path-info --json`, the object KEY is the authoritative
store path, but it was spread BEFORE the value, so a `path` field inside the
value would overwrite it and record a wrong store path in the manifest. Spread
the value first and let the key win. Not a type silencer — it corrects which
store path the manifest reports.

Audited the whole repo: release-notes was the only unregistered tool project, so
this gap is isolated rather than systemic.

Verified: `moon project release-notes` resolves (was unknown_id); `moon run
release-notes:ci` is green — 22 pass / 0 fail, typecheck clean (was exit 2); the
generator's --dry-run emits 8 named nix outputs each with a narHash and real
/nix/store paths; biome clean; sea-ref-gate and orion-ref-gate clean.

Ledger-impact: none — CI project registration and a local bug fix.

Refs RIG-3731
@linear-code

linear-code Bot commented Sep 12, 2026

Copy link
Copy Markdown

RIG-3731

@trunk-io

trunk-io Bot commented Sep 12, 2026

Copy link
Copy Markdown

😎 This pull request was merged.

@github-actions

github-actions Bot commented Sep 12, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-repo-rig-3731-regist.compass-eng-docs.pages.dev

Deployed from compass-repo/rig-3731-register-release-notes at 749f0b8.

…y (RIG-3731)

Review follow-up, and a correction to the parent commit's claim.

The parent said reordering the spread to `{ ...v, path }` "corrects which store
path the manifest reports". That is WRONG, and I verified it against real nix
rather than reasoning about the type: `nix path-info --json` (2.34.7, the CI nix)
emits the keyed form, and its values carry

  ca, deriver, narHash, narSize, references, registrationTime, signatures,
  storeDir, ultimate, version

with NO `path` key. So both spread orders already produced the authoritative
key, and the shipped manifest was never wrong. The reorder was a TS2783 silencer
that happened to also be correct in principle.

The actual root cause was the type model: PathInfoEntry was used for BOTH the
array element (which does carry `path`) and the keyed-form value (which does
not, because the path IS the key). Declaring `path: string` on the keyed value
made TS believe `v.path` exists, which is what produced the duplicate-key error.

Model the two shapes distinctly — `KeyedPathInfo = Omit<PathInfoEntry, "path">`
in the Record position — so the type matches what nix actually emits and the
spread order stops mattering at all.

Deliberately NOT adding a regression test for the duplicate-`path` divergence:
it is unreachable with real nix, so a test would assert behaviour on a shape nix
never emits. That is padding, not coverage.

Verified: `moon run release-notes:ci` green — 22 pass / 0 fail, tsc rc=0; probed
`nix path-info --json` directly to confirm the keyed value has no `path` field.

Ledger-impact: none — type model only, no behaviour change.

Refs RIG-3731
@trunk-io

trunk-io Bot commented Sep 13, 2026

Copy link
Copy Markdown

Stacked PR 1190 failed testing in the merge queue. Please investigate the failure and re-submit the stack.

@trunk-io
trunk-io Bot merged commit f5443bc into main Sep 13, 2026
14 checks passed
@trunk-io
trunk-io Bot deleted the compass-repo/rig-3731-register-release-notes branch September 13, 2026 22:29
@trunk-io

trunk-io Bot commented Sep 13, 2026

Copy link
Copy Markdown

This pull request was merged into main as part of stacked PR 1190.

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