mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #382] [MERGED] build(catalog): preserve generatedAt across rebuilds to stop cross-PR conflicts #941
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#941
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Agents/pull/382
Author: @kolacheee
Created: 8/16/2026
Status: ✅ Merged
Merged: 8/16/2026
Merged by: @kolacheee
Base:
staging← Head:fix/catalog-generatedat-churn📝 Commits (2)
80f19edbuild(catalog): preserve generatedAt across rebuilds to stop cross-PR conflictsdd5bf1bfix(catalog): validate committed generatedAt as canonical ISO-8601, not just Date.parse📊 Changes
8 files changed (+176 additions, -4 deletions)
View changed files
📝
.github/workflows/pull-request-checks.yml(+3 -0)📝
CONTRIBUTING.md(+2 -0)📝
scripts/build-agent-catalog.mjs(+2 -1)📝
scripts/build-feature-packages.mjs(+2 -1)📝
scripts/build-pixelforge-package.mjs(+2 -1)📝
scripts/catalog-lanes.mjs(+45 -0)📝
scripts/sync-catalog-artwork.mjs(+2 -1)➕
scripts/tests/catalog-generatedat-determinism.regression.mjs(+118 -0)📄 Description
Pull request
Linked issue
Closes #381 — removes the timestamp conflict that fires on every concurrent package PR (implements Option B). Options A and C from #381 are broader enhancements beyond the reported problem and are captured there for a possible owner-led follow-up.
Why this change
Every package build stamped
catalog.generatedAtwith the current wall-clock time right before writingcatalog/{catalog,v2,v3}.json. That single line differs between any two regenerations, so two package PRs open at the same time always conflict on it — and when one merges, every other open PR has to rebase and re-run the full CI suite. With several devs working concurrently this fires constantly. It is the catalog conflict that happens every time (a merge only stays clean when just one side regenerated; as soon as both do, the timestamp collides).What changed
writeCatalogFamily()(scripts/catalog-lanes.mjs) now resolvesgeneratedAtthrough a newresolveCatalogGeneratedAt(): preserve the committed value by default so a no-op rebuild is byte-identical, and refresh it only when a publish step opts in withMARINARA_CATALOG_STAMP_GENERATED_AT=1. A fixed epoch is the first-build fallback.catalog.generatedAt = new Date()stamps (build-agent-catalog.mjs,build-feature-packages.mjs,build-pixelforge-package.mjs) and routedsync-catalog-artwork.mjsthrough the same resolver — it previously rewrotecatalog.jsonwith a fresh timestamp on every run, diverging it from the v2/v3 lanes, so this also fixes a latent inconsistency.scripts/tests/catalog-generatedat-determinism.regression.mjsand wired it into the catalog PR check; added a CONTRIBUTING note.With the always-changing timestamp gone, two PRs that touch different packages now typically auto-merge (non-adjacent array inserts). Adjacent-entry conflicts and the full "CI owns the catalog" redesign (Option A) are discussed in #381 — A is deliberately left for the repo owner because it changes the CODEOWNERS/owner-only-
mainintegrity model.Package and security impact
No package payload, artifact, manifest, hash, or committed catalog file changes — this only changes how the generator fills one derived field. Security-neutral: it does not alter who commits or reviews
catalog/+artifacts/. The Engine catalog schema only requires a valid ISO-8601 datetime, and the capability package manager (package-manager.service.ts) drives updates by per-packageversion, never by cataloggeneratedAt— verified — so preserving the value is functionally inert for the Engine.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
node scripts/tests/catalog-generatedat-determinism.regression.mjs— passes locally (preserve-by-default, epoch fallback, andMARINARA_CATALOG_STAMP_GENERATED_AT=1refresh). Now part of thepull-request-checksgate.node scripts/test-catalog-lanes.mjs— passes locally. All five edited scripts passnode --check.node scripts/validate-catalog.mjs— not checked above because it fails on this Windows checkout on a pre-existing CRLF artifact (eightball agents.jsonsize), reproducible with these changes stashed; it is unrelated to this PR and expected to pass on CI's Linux/LF runner. Please confirm green in CI.MARINARA_CATALOG_STAMP_GENERATED_AT,generatedAtnow freezes at its current committed value. That is functionally inert for the Engine (above), but if you wantmain's timestamp to keep advancing per release, addMARINARA_CATALOG_STAMP_GENERATED_AT=1to thestaging→mainpromotion step.Documentation impact
(CONTRIBUTING.md updated to document the preserve-by-default behavior and the
MARINARA_CATALOG_STAMP_GENERATED_AT=1opt-in.)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.