Repository navigation
feat(stardust): replica --extend / --extend-next adds pages to a delivered site - #823
catalan-adobe wants to merge 36 commits into
Conversation
…after handoff Closes #812.
…ling and republish steps - extend-pass.md: --detail without leading dashes; input checks; spec opening bytes kept and restored by copy; foundation re-frozen from its own manifest; roster selected into urls.txt before capture (crawl --select-only) and read on resume; selection order recorded once in order.txt; siblings advanced to directed with a slot-filled source; republish list from localize-links --json perFile, held on unrelated edits and confirmed outside hands-off - crawl.mjs: --select-only; relative state urls resolve against site.originUrl; a state file without pages[] and off-origin --pages exit 2; an all-captured --pages list exits 0 before any browser - foundation-freeze.mjs: --paths-if-present, --from <manifest> - deploy-batch.mjs: --paths accepts content file paths (/x.html) - evals/replica-extend: a delivered one-page run extended with --extend-next 1
…ter and selection gaps - extend-pass.md: relinked pages published only on the owner's yes in every mode (hands-off: a blocked line, nothing published), diffed against the opening commit; ledger read before flag checks, the positional URL must be the project's site; script copies refreshed at opening; roster written to a temp file and renamed on success, re-selected from request.txt; order from recorded provenance only; interrupted captures reconciled; spec files that were absent stay absent - crawl.mjs: --pages exact under --skip-captured; same-origin non-asset filter in both orders before the cap; www-folded capture keys; records under <out>/pages count as captured; discovery.selection recorded; one-line all-captured exit - foundation-freeze.mjs: --paths-if-present records absent[], check reports added - plan.mjs: blocks delivered pages run are converted; a later pass reuses them; new plan.test.mjs - evals/replica-extend: setup.sh commits the fixture; crawler path and criteria
… bounded pilot - crawl.mjs: the asset/other-host filter applies only with --link-first or under --skip-captured, so a plain capped extract selects as before; /index.html folds into its folder for --skip-captured; --skip-urls <file> (pages an earlier pass could not capture) - extend-pass.md, SKILL.md: no extend pass on a bounded-single pilot (it re-runs Phase 1 --prep); --extend URLs without query strings; pass number from the ledger, x<N>/ created after extend start; failed.txt; an empty roster is 'nothing new found by discovery'; gate-all-x<N> re-gates earlier pages whose inputs changed (#793) - ia-extraction.md, prep-mode.md: --skip-captured never with --refresh / --refresh-all; its effect on --pages and the crawl log stated - plan.test.mjs: a failed representative with a deployed sibling (reuse, rep lost) - evals/replica-extend-noop: a resume without --extend* after handoff end writes nothing
…elivered paths, allow-lists every PUT - crawl.mjs: _crawl-log.json appends runs[] (latest fields stay at the top); --first-run-order and --skip-failed read it, replacing replica's order.txt / failed.txt; --delivered reserves coverage paths; strict selection folds queries and /index.html to one slot per delivery path, assets out even with an empty captured set - deploy-batch.mjs --allow: no page outside the publish list is sent - done-check.mjs --track: only the pass's own I-dashboard end completes it - foundation-freeze --from: a formerly absent path that exists now is frozen, not dropped - replica: the delivered-run check is Setup step 0, before installs and copies; idempotent opening; render units serialized; G per pass slug; fresh gate after an approved re-PUT
…dentity only against coverage; fail-closed --allow and --track - crawl.mjs: --skip-captured keeps the source page identity (query strings stay); --delivered turns on delivery-roster mode, with destinations from contracts.mjs (lib/paths.mjs): named and discovered rosters dedupe by destination, named collisions checked before captured pages drop (case folded), coverage slugs reserved for the capture run too - deploy-batch.mjs: --allow without a usable value exits 2 with nothing sent; a /x/ entry is /x/index - done-check.mjs: --track without a usable name exits 2 - replica: Setup step 0 dispatches on the track first; extend pass preflights a named roster before opening, closes a rejected request, builds publish.paths from content files, scopes a republish approval to its revision
…ster.mjs; immutable republish revisions - extract crawl.mjs back to a source tool: --delivered removed; --skip-captured dedupes new urls of one source page (query values stay distinct); --reserve-slugs; --max 0 lists every candidate - replica/scripts/extend-roster.mjs (new): select filters candidates by EDS destination (contracts.mjs) against captured pages, coverage rows and existing content documents (nav, fragments), prefers a query-less url so the roster replays; publish lists only documents absent from the opening snapshot - extend pass: opening content snapshot; pass-owned foundation manifest as re-freeze evidence; archetype representative rendered as archetype; republish as frozen revisions (digest, own ledger, safe restore); spec restore limited to the six spec paths - foundation-freeze: manifest paths validated as root-relative; done-check --track uses the ledger's grammar
…snapshots out of commits, never restores over an owner's edit - deploy-batch.mjs: a step succeeds only on 2xx (an exhausted transport failure is put-fail, not live); a --paths/--allow entry that names two documents (/nav.html) exits 2 before any request - extend-roster.mjs: publish lists content file paths (/nav.html.html, /visit/index.html); select writes the slug reservations before the roster, so a roster on disk means the selection completed - crawl.mjs --pages-file: a roster replays whole (a url may hold a comma) - extend pass: C-final runs handoff-contract's three final units with -x<N>; opening/ and approved revisions are git-ignored with tracked sha256 lists; a declined republish restores only the localizer's own output, a mixed or edited file is held as a conflict - foundation-freeze: a .. segment is refused as written, before normalizing - eval fixture: content/index.html, the opening snapshot asserted
…e relinks checked by script - extend-roster.mjs: a tracked opening inventory (path, sha256, tracked|ignored) replaces the content snapshot; publish lists only new documents of roster pages or also.paths (an owner's draft is held), enumerated exactly as deploy-batch does; relink-before/after record the localizer's input and output, relink-status classifies older documents against their last published bytes (opening blob or a landed revision) as candidate, conflict or held; relink-approve freezes a committed revision, relink-restore acts on candidates only - deploy-batch.mjs: list entries resolved against the documents (literal or one .html dropped; ambiguous exits 2, unmatched --paths exits 1); the ledger records the sha256 each PUT sent and a live page changed since is driven again - crawl.mjs: http and https are one site and one page; interrupted records are named - extend pass: C-final re-runs each cluster's deploy (pages relinked after their PUT); an approved revision is re-gated in each final unit's own mode (--width, --wide); coverage reads the delivery tables only
…blication evidence from the deploy ledgers - localize-links.mjs: --receipt <file> records the sha256 each run read and wrote for the files it rewrote (one receipt per run); --exclude-targets <file> keeps held documents from becoming link targets - extend-roster.mjs: relink-status reads the receipts (relink-before/after and their shared pending file removed); the inventory records what the deploy ledgers and earlier passes say of each document (live, live-unverified, differs, unpublished) and only a published document has an opening baseline; publish refuses two new documents for one roster page and writes held.paths; new reconcile lists pass documents not delivered as they are now - deploy-batch.mjs: the skip digest (sha256) is written only after live and verify succeed; putSha256 records what was sent, so a token halt never marks new bytes live - crawl.mjs: an incremental run keeps an earlier locale root's outstanding capture gaps - extend pass: checkpoint an approved revision before sending it; reconcile at C-final (archetypes, fragments); an approved nav or footer re-runs the final units over every page; unanswered candidates counted
…ublishes only recorded unit outputs - lib/documents.mjs (new, shared): contentDocuments (lowercase .html, the deployer's rule), resolveEntry (what a path-list entry names), LIBRARY_ROOT / isLibraryPath; used by deploy-batch, localize-links, extend-roster and da-library instead of their own copies - extend-roster: new output command (a unit records the exact files it wrote; publish lists only those plus also.paths, each checked with the deployer's entry rule); /library refused at selection and publication; a live row without a digest is held from approval; approve freezes the classified bytes; restore is a guarded move-aside/link write; new published command writes the library's input at delivered bytes; targets.paths replaces held.paths - localize-links: --targets (an allow-list) replaces --exclude-targets; the receipt is written, its folder created, before any page; a file changed while the run read it is left alone - deploy-batch: --adopt records a digest for a pre-digest live row when DA's source holds the local bytes exactly - extend pass: units record outputs; the two localizer invocations spelled out; adopt at the opening; the library refresh from the published tree; shared-document approvals re-gate without --skip-existing
…ive documents; per-unit outputs - deploy-batch: a re-run skips every page its ledger reads live and the origin serves, as documented (the changed-page re-drive is gone; digests are still recorded); --adopt records a digest only when the admin status shows the live page published from the matching source, else keeps sourceSha256 apart; a --content that is not a directory exits 2 before anything is written - extend-roster: inventory writes reserved.paths (every DA document a ledger records live, file or not), enforced by select, output and publish; output writes per-unit outputs/<unit>.paths and publish validates the union; the newest live row decides the last published bytes, matched against any pass's committed copies; guardedRestore prepares the replacement first, handles EEXIST apart and puts the original back on any other failure - extend pass: the reconcile deploy carries --force on redrive.paths under --allow
… forced re-drives keep the last verified publication
- deploy-batch --adopt (needs --paths): proof is DA's source bytes = the local file AND the source's Last-Modified =
the admin status's live.sourceLastModified (a bare status request; helix-admin fills edit.lastModified only on an
edit lookup, and not at all for a DA source); a page with no ledger row can be adopted; --force keeps the ledger and
only bypasses the skip; each row keeps its last verified publication (published: {sha256, at}) apart from the
attempt's status
- extend-roster: new opening-check (delivered documents whose published bytes cannot be recovered → unproven.paths);
deploy ledgers (stardust/deploy/ledger-*.json …) that cannot be parsed stop every command; output records only grow;
published also recovers documents missing from content/; link targets include pages coverage delivers
- lib/documents.mjs: deliveredRows and contentFile (moved from da-library), replaceIfUnchanged (used by localize-links
and relink-restore); hidden entries skipped unless hidden: true (deploy-batch keeps sending them, as on main)
- localize-links: every page written through replaceIfUnchanged — a concurrent save is kept and reported as a conflict
- extend pass: opening-check reports at the opening; C-deliver proves (adopt) or blocks before the first PUT; after
C-final, G and E2 re-run reconcile and the forced re-drive
…zen re-delivery; ledger runs merge only their rows - deploy-batch: --adopt removed (a one-second Last-Modified cannot identify a revision); a run merges only the rows it drove and exits on the pages it selected; a live POST that succeeded but did not verify is recorded as liveAttempt - extend-roster: opening-check covers the library's inputs (coverage pages) and recovers a missing file from a commit; new redeliver freezes the opening commit's bytes as an approved revision; publish writes rewrite.paths (never an opening document whose only proven copy is its working file); an unverified live publication makes the version unknown; ledger keys must be canonical DA document paths and materialization stays inside its tree - lib/documents.mjs replaceIfUnchanged: refuses symlinks; keeps its files in the git dir, never staged - localize-links: --rewrite (only the listed documents are rewritten) - extend pass: unproven pages are re-delivered from frozen committed bytes on the owner's yes, or the pass ends
…end pass reads no older page it covers - da-library --add: reads only the delivered pages the publication has not read (libraryDelta, the rule of done-check's stale gap), reads the published library back from DA first, appends new class combinations to the block documents DA holds, adds new blocks and templates, merges the sheets; any read that fails stops it before a DA write, and the marker stays standing (an append removes nothing it records) - lib/documents.mjs: libraryMarkerPath and libraryDelta (rollout lib.mjs re-exports them) - extend-roster opening-check: with a library published to this site its inputs are only the pages that publication has not read, so a legacy site's older pages need no proof and no re-delivery; publish reports how many opening documents may be relinked - extend pass: the library refresh runs da-library --add when a library is published
A pass now sends and rewrites only its own documents. Relinking and re-publishing older pages leaves the pass: the report lists them. - extend-roster.mjs keeps select, output and publish. publish writes the guard content/.deploy-allow. - deploy-batch.mjs and localize-links.mjs read that guard. Without the file they behave as on main. - da-library.mjs, rollout lib.mjs, contracts.mjs and lib/ are main's again. lib/documents.mjs is removed. - The digest ledger fields, --allow, --receipt, --targets, --rewrite and da-library --add are removed. The relink work this replaces is the head of #813 (3f2bd07).
catalan-adobe
left a comment
There was a problem hiding this comment.
Approach
What it does: Lets a completed replica run deliver named pages or the next N pages on the same site. Each pass fixes its page list before capture, preserves the approved design, and reuses gated archetypes. Without an extension request, a completed run just reports its state.
Fit with the repo: Replica is the right entry point for #812. The concern is how the pass establishes what it may publish. skills/replica/reference/extend-pass.md tells a migrate unit to register the files it wrote under content/, but plugins/stardust/README.md assigns migrate’s output to stardust/migrated/; deploy creates the content/ documents later. Both deploy-batch.mjs and localize-links.mjs also treat a missing content/.deploy-allow as unrestricted. The PR acknowledges: “The contract orders that step. No script enforces it.” During an open pass, that conflicts with root AGENTS.md’s fail-closed rule.
Strongest case for the approach as built: It reuses ledger tracks, rollout’s pending-page plan, and the existing gates instead of building a second pipeline. Deferring older-page relinking also avoids the approval and recovery machinery of #813.
Alternatives: Keep the pass. Register each new document at deploy conversion, when its actual path is known. Share one check between the two writers: if the ledger shows an open extension, require that pass’s allow-list before rewriting or sending anything. That costs a ledger read and a change to the handoff instructions; ordinary deployments keep their current behavior.
Questions for the author: Is there already an enforced delivery entry point that records converted files and refuses unscoped writes on an open pass? That would resolve my concern.
Missing context: The reported fake-DA run exercised the guard once installed, but not migrate.mjs render or rollout inside a pass. The field run on #812 is still pending.
Approach: Questionable
Strengths
plugins/stardust/skills/replica/scripts/extend-roster.mjs:193–195writes the reservations beforeurls.txt. That gives resume a useful invariant: a roster on disk means selection finished.plugins/stardust/skills/replica/scripts/test/extend-roster.test.mjs:216–237exercises the real localizer and deployer against the guard thatpublishproduced. Checking older documents’ bytes and the actual PUT destinations is stronger than testing the allow-list in isolation.- I ran the
extend-roster,crawl,plan, anddone-checksuites; all passed. The delivery-stage failure below occurs at a boundary those suites do not exercise.
Issues
🚨 Critical (Must Fix Before Merge)
-
plugins/stardust/skills/replica/reference/extend-pass.md:150–156— the documented handoff stops after a successful render. I ran the real sibling render on a temporary copy of the fixture. It reportedrendered 1 … → stardust/migrated/; the prescribedoutput --files visit/index.htmlthen exited 2:not a document under content. This is not a path-prefix typo: the migrated HTML is the input to deploy conversion, not the document to publish. Moveoutputand the guard refresh to immediately after conversion creates the actualcontent/file, before localization or PUT. Keep the guard empty during migrate. -
plugins/stardust/skills/replica/reference/extend-pass.md:181–186— following the closing instructions removes protection while delivery can still fail. The pass deletes.deploy-allowbeforedone-check. If that check reportspages_not_live, the normal remedy is to publish and retry. At this pointdeploy-batch.mjs:306–314treats the missing file as unrestricted, as doeslocalize-links.mjs:204–206. A forced recovery batch can therefore send the older pages and an owner’s draft. Keep the guard through all checks and recovery; make both writers refuse to run when the ledger shows an open extension but its guard is missing. Ordinary runs with no open extension can retain today’s behavior.
⚠️ Important (Should Fix)
-
plugins/stardust/skills/replica/scripts/extend-roster.mjs:180–195—reserved.pathsis not the complete opening snapshot. It omits captured-only destinations, although selection treats them as taken; analso.pathsentry can subsequently claim one. It also walks the current content tree after discovery, not the tree atbase.txt. If an owner removes a tracked draft between opening and selection, no coverage or deploy ledger need name it, and the pass can publish a replacement at its opening destination. Record the opening set durably, including captured destinations and the opening commit’s content paths, and use it for both selection and publication. -
plugins/stardust/skills/deploy/scripts/deploy-batch.mjs:300–311— a forbidden--pathsentry is silently ignored if its file is absent. For a list containing one allowed new page and a ledger-only older/footer, the initial filesystem filter drops/footer. The guard then sees no violation and sends the new page, contrary to the promised exit 2 with zero requests. Compare the normalized requested paths against the guard before intersecting them with the files on disk. -
plugins/stardust/skills/deploy/scripts/localize-links.mjs:200–206— a held draft can override the link target that will actually ship. With allowedvisit/index.htmland heldvisit.html—the competing-leaf case already in the composition fixture—I observed an allowed page’s link rewritten to/visitinstead of/visit/.--checkthen passed.buildMapgives the last file with the same lookup key precedence, before it knows which file the guard allows. Keep older documents as targets, but give the recorded pass output precedence on a collision. Test the href from a third document. -
plugins/stardust/skills/replica/scripts/extend-roster.mjs:73–78— path membership does not protect older files reached through a symlink.documents()follows symlinks withstatSync. A new roster path that links to an older HTML file can therefore be registered under its new name; localization through that name writes the older file’s bytes. Reject symlinked files and directory components for guarded outputs, and validate this at the writer as well as at registration. -
plugins/stardust/skills/replica/scripts/extend-roster.mjs:250–278— concurrent guard refreshes can lose a unit. Atomic rename prevents a torn file, not a stale write: one publisher can read the records, another can add a fragment and publish the larger set, and the first can then rename its smaller guard over it. The concurrent test attest/extend-roster.test.mjs:163–173waits for all writers and callspublishonly once. Serialize the read/build/replace operation or give one coordinator ownership of guard refreshes before releasing clusters to deploy. -
plugins/stardust/skills/extract/scripts/crawl.mjs:347–352— discovering a redirect alias is mistaken for recovering a missing state row. With an existing migratedindexrow for/and its on-disk capture recordingfinalUrl: /en/,addCapturedRecordsreportsindexas absent from state. The pass explicitly tells the caller to add that row in Phase 6. Track state-row membership separately from URL aliases: reserve the final URL, but do not report an existing slug for reinsertion. -
plugins/stardust/skills/extract/scripts/crawl.mjs:739–746— automatic discovery drops valid site aliases before identity folding. With awwwentry and the only uncaptured candidate on the apex host, strict selection returned no URLs. The link and sitemap readers also prefilter by the literal origin at lines 779 and 797. Thus--extend-nextcan report zero new pages where naming the same page explicitly works. Use the existing same-site predicate consistently in incremental discovery, while preserving plain-crawl behavior.
💡 Minor (Nice to Have)
plugins/stardust/skills/replica/reference/extend-pass.md:181–183— the closing report misses renamed opening documents. I checked a staged rename: Git classified it asR100, so--diff-filter=MDprinted nothing. Add--no-renamesso the old path is reported as deleted, or explicitly handle rename records.
Recommendations
Extend the composition test by one stage on each side: start with a real migrate.mjs render, register the converted document, and end with a failed completion check followed by a retry. Assert both the exact PUT set and the older files’ bytes after recovery, not just during a successful guarded batch.
Assessment
Ready to merge? No
Reasoning: The documented path cannot register a normally rendered page, and the documented recovery path can publish documents outside the pass. Both affect the feature’s central delivery guarantee.
Review generated by gh pr-review · model: azure-openai-direct/gpt-6.2-astra
Fixes from the review of c3fd879 on #823. - deploy-batch.mjs and localize-links.mjs share publish-guard.mjs. When the run ledger shows an open extend pass and the guard file is missing, they send and write nothing. - deploy-batch.mjs checks the requested --paths against the guard, not the files found on disk. - localize-links.mjs gives a listed document the URL when a held one claims the same. - extend-roster.mjs: publish works under a lock; a document reached through a symbolic link is refused; captured destinations are reserved. - crawl.mjs: a record whose slug the state holds is not reported as a missing row. - extend-pass.md: output runs after conversion writes content/, not after migrate. The guard stays until extend end. The closing diff uses --no-renames.
… before selection
|
Reply to review 6063636756 (on The question
No, there was none. Now there is a refusal, and registration stays a documented step:
Critical
Important
Minor
Tests
The |
catalan-adobe
left a comment
There was a problem hiding this comment.
Approach
What it does: Lets a completed replica run deliver named pages or the next N pages without rebuilding its approved design. With neither flag, it reports completion and writes nothing.
Fit with the repo: Replica is the right entry point for #812. The concern is the promise that “a pass never sends a document that existed at its opening.” The revised publish-guard.mjs protects two tools, deploy-batch.mjs and localize-links.mjs, including retries. But skills/replica/reference/extend-pass.md also says to follow handoff-contract.md §2 as written, and that contract permits direct DA PUTs for individual documents. Those writes do not consult the guard. The guard’s input also depends on a manual check: extend-roster.mjs select reads the checkout at selection time, not at opening. As the PR says, “No script enforces it.” Root AGENTS.md requires action guards to fail closed.
Strongest case for the approach as built: The pass reuses ledger tracks, rollout’s pending-page plan, and existing fidelity gates rather than building a second pipeline. Registering documents after deploy conversion respects the split between stardust/migrated/ and content/. Deferring older-page relinking avoids the approval and recovery machinery of #813.
Alternatives: Keep the pass. Record reserved content paths at opening alongside base.txt, and route every page or fragment PUT in an extension through the guarded batch writer, even for one document. That costs one snapshot and a narrower handoff instruction; ordinary deployments need not change.
Questions for the author: Is there already an enforced publishing path for single documents during an extension? If so, only the opening snapshot needs rework.
Missing context: The reported fake-DA run exercised guarded batches and recovery, but not conversion or a full rollout. The field run on #812 is pending.
Approach: Questionable
Strengths
plugins/stardust/skills/replica/scripts/extend-roster.mjs:197–200writes the reservations beforeurls.txt. That gives resume a reliable signal that selection finished.plugins/stardust/skills/replica/scripts/test/extend-roster.test.mjs:270–316checks actual PUT destinations and older documents’ bytes, including recovery after a missing guard. The earlier missing-guard and localizer-precedence fixes are covered by behavior, not just by inspecting the allow-list.- I ran the
extend-roster,crawl,localize-links, andplansuites; all passed. The failures below occur at boundaries those suites do not exercise.
Issues
Paths below are relative to plugins/stardust/.
🚨 Critical (Must Fix Before Merge)
-
skills/replica/reference/extend-pass.md:136–140— the documented single-document publish path does not enforce the guard. The pass explicitly inheritshandoff-contract.md§2 unchanged. That section permits a hand-written nav/footer PUT, specifies a direct per-page PUT, and says to publish chrome (skills/replica/reference/handoff-contract.md:47–51). A recovery following those instructions can send an older footer even when.deploy-allowcorrectly excludes it. The new missing-guard refusal fixes batch retries, not this path. Require the guarded batch writer for every page and fragment PUT during an extension, including one-document repairs. If an older document needs repair, report it as blocked rather than sending it. -
skills/replica/reference/extend-pass.md:185–187— Phase G and the library refresh can use a held draft instead of the registered output. I tested the same collision the PR handles in the localizer: registeredvisit/index.html, heldvisit.html, coverage path/visit. The realautofix-aem.mjs --slug visitedited the held file, andda-library.mjs --dry-runput its draft text in the generated library block. Both resolvers try the leaf first (skills/rollout/scripts/lib.mjs:176–179,skills/rollout/scripts/da-library.mjs:205–208); a non-dry library refresh then PUTs that block. This is not the acknowledged case of an owner editing an older delivered page: this file was never delivered. Resolve pass pages from their exact output records for both operations, or stop on ambiguity before editing or publishing.
⚠️ Important (Should Fix)
-
skills/deploy/scripts/publish-guard.mjs:29–34— an existing guard is accepted without checking which pass owns it. Duringx2, retrying anx1publish command rebuilds the global.deploy-allowfromx1’s retained records. The publishers lock different pass directories (skills/replica/scripts/extend-roster.mjs:258–259), and the consumer returns the old allow-list before reading the ledger. A forced batch can therefore resendx1documents that existed whenx2opened. Bind the guard to its track, reject a publish for a non-current track, and verify that binding at consumption. -
skills/replica/reference/extend-pass.md:84–94— the new Git check can pass even though an opening document is missing from reservations. I tested an ignored, never-publishedcontent/local-draft.html. Opening status was clean; after moving the draft aside, the prescribedgit diff --quietexited 0, andselectadmitted/local-draft. This is new evidence beyond the acknowledged risk of skipping the manual check: following it does not protect ignored documents. Persist the on-disk document paths at opening, including ignored files, and union that snapshot into selection and publication reservations. -
skills/replica/scripts/extend-roster.mjs:185–190— named selection and capture disagree about redirect aliases. With a state row for/and its capture recordingfinalUrl: /en/, I got a one-page named roster for/en/andreserved.pathscontaining only/. Replaying that exact roster immediately printed0 new pagesbecause the crawler also reads the on-disk records. The earlier fix correctly stopped reporting the home slug as missing; the roster still promises a page that capture will never add. Use the same capture records, including final URLs, for selection and reservations. -
skills/replica/SKILL.md:44–52— the read-only decision is too late for the advertised$stardust replicaentry point. The master skill copies its scripts before routing to replica (skills/stardust/SKILL.md:72–81,95–110). On a delivered project from an older plugin version, a no-flag resume can therefore modify the checkout before replica reads the ledger. The no-op eval expressly permits refreshed scripts (evals/replica-extend-noop/criteria.json:13), so it cannot catch this. Route this case before mutating master setup, and compare the entire checkout against its pre-invocation state in the eval. -
skills/replica/scripts/extend-roster.mjs:85— the link check misses hard-linked outputs. Unlike the previously fixed symlink case, a hard-linked copy of an opening document has its own real pathname and passes bothoutputandpublishwithout any subsequent file swap. The localizer’s in-placewriteFileSyncthen changes the opening document’s bytes too (skills/deploy/scripts/localize-links.mjs:222–226). Reject multiply linked guarded outputs, or replace the allowed file atomically rather than modifying the shared inode.
💡 Minor (Nice to Have)
skills/deploy/scripts/localize-links.mjs:218–226—heldis broader than the closing report says. A draft created during the pass with/about.htmllinking to an already delivered page is counted as an “older document keeping source links,” even though neither part is true. Keepheldas a diagnostic, but deriverelink-pending.txtfrom opening documents with source-host links to this pass’s delivered destinations.
Recommendations
Extend the fake-DA test through Phase G and library generation with distinct marker text in the registered page and the competing draft. Assert that the draft stays byte-identical and that its text appears in no outgoing body. Then open x2 and verify that retrying an x1 command cannot authorize a write.
Assessment
Ready to merge? No.
Reasoning: The guarded batch and localizer paths are substantially improved, but the documented rollout can still publish an older document or expose a draft that the guard correctly held. Those failures break the central promise of the extend pass.
Review generated by gh pr-review · model: azure-openai-direct/gpt-6.2-astra
…erved Fixes from the review of 17af82d on #823. - publish-guard.mjs: a guard that names another pass, or none while a pass is open, authorizes nothing. - extend-roster.mjs publish: only the open pass may run it. It stops on a second file at a pass output's path, because rollout's autofix and library read the first file that matches. - extend-roster.mjs output and publish refuse a hard link too. - extend-roster.mjs select: --opening keeps every document of the opening reserved, also one that has left the tree. It reads the capture records as the crawler does, so a redirect's final URL is captured. - extend-pass.md: every document of a pass is sent by deploy-batch.mjs, never by a hand-written PUT. relink-pending.txt lists opening documents only. The entry text says what master Setup writes.
|
Reply to review 6071205574 (on The question
No. Critical
Important
Minor
Tests
|
… output A fresh agent session passed `content/visit/index.html` to `output --files`, was refused, and recovered from the message. The contract, the usage text and the refusal now say that the path is relative to the content dir.
… holds the migrated home - extend-pass.md gains a section for a caller, a person or a system that runs the skill unattended: the three calls, that a restart is the same command sent again, the state as one ledger line, that a refused request writes nothing, and that a blocked line carries --next. - The replica-extend fixture gains stardust/migrated/index.html and its sidecar, written by migrate.mjs, and the coverage row gains the file's sourceHash. inventory.mjs keeps a delivered row only while its migrated file is in the checkout: without it, two eval sessions lost the home row and restored it by hand.
Local tests with fresh agent sessionsI tested the feature on one machine with 12 agent sessions. This comment gives the setup, the results and the limits. The head is Setup
Results
Phase 5 against a stand-in for DANo eval covers delivery, so I wrote a small server. It stands in for the DA source API, the admin API and the delivered origin. It stores what it receives, and it logs every request with the client's user agent. The project had a delivered home, nav and footer. The home and the nav linked to the source site for the page of the pass.
What the sessions found
Limits of these tests
Still not tested
|
catalan-adobe
left a comment
There was a problem hiding this comment.
Round 3 · since round 2
5 fixed · 2 still open · 2 new (2 in the new commits) · 1 declined · open blocking: 3 (was 7) · loop: converging
Approach
What it does: Adds tracked extension passes so a delivered replica can add named or next-ranked pages without rebuilding its approved design or reopening completed units.
Fit with the repo: plugins/stardust/README.md already makes replica the coordinator for the incremental extract → migrate → rollout pipeline, matching issue #812’s observation that those sub-skills largely support additional pages already. The round 2 concerns are now resolved: skills/replica/reference/extend-pass.md records opening.paths when the pass opens, and requires every pass document—including single-document repairs—to use deploy-batch.mjs. The shared deploy/scripts/publish-guard.mjs makes both publishing and localization fail closed from the tracked pass state, consistent with root AGENTS.md. The changes extend existing ledgers, planners, and writers rather than creating a parallel pipeline.
Strongest case for the approach as built: It preserves the established replica orchestration and existing delivery lifecycle while isolating each extension through ledger tracks, pass-suffixed units, a frozen specification, and a pass-owned publication allow-list.
Alternatives: A separate extension skill or copied rollout pipeline would duplicate replica’s state machine and delivery contracts. A broader generic transaction framework could replace the pass guard, but would require a much larger refactor without a demonstrated second use case.
Questions for the author: None. I would reconsider if any mandatory extension operation still had to publish a document outside deploy-batch.mjs.
Missing context: A real DA/aem.live field run and a successful multi-page or second delivery pass remain untested, but that affects confidence in execution rather than architectural fit.
Approach: Sound
Strengths
plugins/stardust/skills/replica/scripts/extend-roster.mjs:205-221now combines state rows, capture-record redirect aliases, delivery records, current documents, andopening.paths, then writes reservations before the roster. This resolves several selection inconsistencies cleanly.plugins/stardust/skills/deploy/scripts/publish-guard.mjs:40-51correctly rejects missing, stale, unnamed, or wrong-pass guards in the normal single-open-pass case.plugins/stardust/skills/replica/scripts/extend-roster.mjs:90-93rejects both symbolic and hard-linked outputs, closing the older-document aliasing path.plugins/stardust/skills/replica/scripts/test/extend-roster.test.mjs:324-359exercises real localization and deployment across missing-guard recovery, stale guards, and a second pass, including assertions on actual PUTs and older-file bytes.plugins/stardust/skills/rollout/scripts/plan.mjs:75-90pre-seeds converted modules from deployed pages, ensuring later passes reuse already-live code rather than reconverting it.
Issues
🚨 Critical (Must Fix Before Merge)
- F12 ·
plugins/stardust/skills/replica/scripts/extend-roster.mjs:307— the collision guard can still let Phase G and the library read the wrong file.- The fix only rejects a colliding file when
!keep.has(f). An entry inalso.pathsis added tokeepfirst, sovisit.htmlinalso.pathsis accepted beside the recordedvisit/index.html. - I reproduced
publishexiting 0 and writing both/visitand/visit/indexto the guard.autofix-aem.mjsandda-library.mjscan consequently resolve the leaf instead of the registered page, despite the contract saying every such collision stops publication. - Reject any
also.pathsentry whose canonical destination is owned by a different recorded output, regardless of whether both files are allowed:Add a regression test withconst dest = pathKey(`/${f}`); if (owner.has(dest) && owner.get(dest).f !== f) { problems.push(`/${f} — shares ${dest} with /${owner.get(dest).f}`); }
/visit.htmlexplicitly present inalso.paths.
- The fix only rejects a colliding file when
⚠️ Important (Should Fix)
-
F14 ·
plugins/stardust/skills/replica/reference/extend-pass.md:92— an interrupted opening can recreateopening.pathsfrom a later tree.- The snapshot is written after
extend start, but the restart instructions say to recreate it when missing. If the session stops between those commands and an ignored opening document is moved before restart, the regenerated snapshot omits it. Selection can then admit that destination and the pass may publish over a document that existed when the pass actually opened. - Never derive an opening baseline from the current tree after
extend start. Stage the snapshot before opening and preserve that staged copy across restart, or fail closed with a blocker when an opened pass lacks its baseline.
- The snapshot is written after
-
plugins/stardust/skills/deploy/scripts/publish-guard.mjs:30— ambiguous ledgers with two open tracks authorize the first pass rather than failing closed.openExtendPass()returns the first member of aSet. The ledger writer does not preventextend start x2whilex1remains open. With both starts present, a# pass x1guard is accepted and can send x1 documents even though they existed when x2 opened.- Detect multiple open tracks and throw an ambiguous-ledger error. Neither publishing nor localization should proceed until the ledger has exactly zero or one open extension.
💡 Minor (Nice to Have)
plugins/stardust/skills/replica/reference/extend-pass.md:232— the closing report cannot detect changes to ignored opening documents.opening.pathsintentionally includes ignored files, butgit diffagainstbase.txtcannot report an ignored file that was edited, moved, or deleted. Such an owner edit will be omitted from the promised report.- Record hashes for opening documents and compare that manifest against the final content tree, using hashes to identify moves where possible.
Fixed since the last round (6)
- F11 — the extension contract now requires every page and fragment, including single-document repairs, to use guarded
deploy-batch.mjs. - F13 — guards now name their pass, consumers verify that owner against the open track, and stale-pass
publishcalls are rejected. - F15 — roster selection now reads on-disk capture records and reserves redirect final URLs consistently with the crawler.
- F16 — declined: “Moving the dispatch means editing
skills/stardust/SKILL.md, which is at 8,460 of its 1,000-token budget… I corrected the text: the entry section and the description now say that master Setup has refreshedstardust/scripts/by then.” The final accepted contract explicitly permits that refresh. - F17 —
outputandpublishnow reject files whose link count indicates a hard link. - F18 —
relink-pending.txtis now restricted toheldentries present inopening.paths.
Recommendations
- Extend the collision test to cover duplicates explicitly listed in
also.paths, not only held duplicates. - Add restart tests that terminate immediately after
extend start, before each opening baseline artifact is written. - Test corrupted or overlapping pass state directly against both
deploy-batch.mjsandlocalize-links.mjs. - Replace the path-only opening snapshot with a path-and-hash manifest that supports both reservation and final reporting.
Assessment
Ready to merge? No
Reasoning: The implementation substantially improves pass isolation, but the documented collision protection remains bypassable through also.paths, and restart or ambiguous-ledger states can still undermine the opening boundary or authorize the wrong pass.
Review generated by gh pr-review · model: github-copilot/gpt-5.6-sol
|
Reply to reviews 6076863297 (on I reproduced each finding before changing anything. The review of Critical
Important
Minor
Tests
|
catalan-adobe
left a comment
There was a problem hiding this comment.
Approach
What it does: Adds an extend pass (--extend <url,...> and --extend-next <n>) to stardust:replica so a delivered same-design migration can add pages on the same project and EDS site without re-running Phase 2 or reopening completed units, and makes resuming a delivered run without --extend* stop with a read-only state report.
Fit with the repo: Fits plugins/stardust/README.md and plugins/stardust/AGENTS.md. replica already coordinates extract, migrate, deploy, and rollout, and issue #812 establishes that those sub-skills mostly support incremental pages while replica lacked post-handoff entry, spec freeze, and unit isolation. The change extends existing primitives rather than building a parallel pipeline:
- Tracks, phases, and freeze manifests: Adds one
extendphase toskills/stardust/scripts/ledger.mjs, an optional--trackfilter toskills/rollout/scripts/done-check.mjs(reusing the track convention fromskills/replica/reference/first-page-first.md), and--paths-if-present/--fromtoskills/replica/scripts/foundation-freeze.mjsso one manifest tool handles the spec, openingcontent/snapshot, and re-frozen foundation. - Skill boundaries preserved:
skills/extract/scripts/crawl.mjsstays a source-side tool (--skip-captured,--reserve-slugs,--pages-file,--skip-failed,--first-run-order,--select-only, plusruns[]in_crawl-log.json), while EDS destination selection and pass-output tracking live inskills/replica/scripts/extend-roster.mjsviaskills/stardust/scripts/contracts.mjs.skills/rollout/scripts/plan.mjspre-seeds already-delivered blocks as converted for any resumed rollout. - Fail-closed guard (
AGENTS.md§ Security):skills/deploy/scripts/deploy-batch.mjsandskills/deploy/scripts/localize-links.mjsshare one library (skills/deploy/scripts/publish-guard.mjs, registered inevals/lint/libraries.mjs) that readscontent/.deploy-allowandstardust/status.jsonl. Outside an open pass with no guard file, normal runs are unchanged; while a pass is open, missing, wrong-pass, or multi-open-pass states fail closed. - Repo budgets and hygiene:
skills/replica/SKILL.mdstays within the 5,000-token budget (4,832 tokens) backed by two new evals (evals/replica-extend/,evals/replica-extend-noop/), detail lives inskills/replica/reference/extend-pass.md, andscripts-index.mdandevals/README.mdare updated.
Strongest case for the approach as built: Bounding the pass to new content/ documents and deferring older-page relinking to relink-pending.txt (instead of #813's inline relink/approval/restore machinery) keeps shared delivery scripts (deploy-batch.mjs, localize-links.mjs, da-library.mjs, contracts.mjs) nearly untouched, enforces isolation through one fail-closed guard file without adding flags to every Phase 5 command, and leaves older-page relinking cleanly composable after extend end.
Alternatives:
- As-is (pass-scoped
.deploy-allowguard + deferred relinking viarelink-pending.txt): Small footprint on shared deploy/rollout scripts and no parallel pipeline. Cost: older documents keep source-host links until a follow-up relinking workflow consumesrelink-pending.txt, and the single-writer rule ("no hand-written DA PUTs") remains contract text because scripts cannot intercept raw HTTP requests. - Inline older-page relinking and approval inside the extend pass (superseded #813): Resolves source-host bounce links in older pages during the same pass (
skills/rollout/reference/operational-learnings.md). Cost: substantially larger cross-cutting changes across deploy and rollout scripts for a separate concern that layers cleanly on top afterward. - A standalone
extendskill instead of flags onreplica: Keeps extend docs outsideskills/replica/. Cost: duplicatesreplica's flow guard, ledger state machine, archetype/sibling routing, and Phase 5 handoff contract, conflicting withplugins/stardust/AGENTS.md's single-home rule.
I would reconsider if a mandatory extend-pass step had to publish a content/ document outside deploy-batch.mjs, or if the follow-up relinking workflow could not consume relink-pending.txt without reworking the pass artifacts.
Questions for the author: None.
Missing context: Exercised via unit/composition suites, evals, and a local decorated-DA stand-in across two passes, but not yet on a real DA / Code Sync / aem.live site or a closing pass that introduces a new page type (and evals were not re-run after the final commit). That lowers execution confidence rather than changing architectural fit.
Approach: Sound
Strengths
- Fail-closed publish guard with narrow blast radius (
plugins/stardust/skills/deploy/scripts/publish-guard.mjs:23-56,deploy-batch.mjs:311-319,localize-links.mjs:204-213): Both writers share one guard module that throws on missing guards, wrong/unnamed pass headers, and multiple simultaneously open tracks instardust/status.jsonl, while leaving ordinary non-extend runs completely unchanged. - Complete destination and aliasing protection in
extend-roster.mjs(plugins/stardust/skills/replica/scripts/extend-roster.mjs:75-120, 211-235, 290-335):selectcombinesstate.json, on-diskcurrent/pages/*.jsonredirectfinalUrls, rollout coverage, deploy ledgers resolved relative to--state, livecontent/documents, and the opening snapshot (--opening), writing reservations atomically beforeurls.txt.outputandpublishreject both symbolic and hard links (aliased), serialize guard updates viadeploy/file-lock.mjs, and now enforce one-file-per-destination across unit outputs,also.paths, and stray competing files on disk. - Strong behavioral and composition test coverage (
plugins/stardust/skills/replica/scripts/test/extend-roster.test.mjs,deploy-batch.test.mjs,localize-links.test.mjs,crawl.test.mjs,foundation-freeze.test.mjs,done-check.test.mjs,plan.test.mjs,ledger.test.mjs): All 8 suites pass locally (198 checks across these suites), exercising the realdeploy-batch.mjsandlocalize-links.mjsagainst a fake DA server across concurrentoutput/publishraces, missing-guard recovery, stale pass headers, multi-open-pass ledgers, andalso.pathscollisions. - Clean incremental primitives (
crawl.mjs:393-397,foundation-freeze.mjs:176-184,plan.mjs:69-75,done-check.mjs:215-221):appendRunpreserves legacy crawl logs asruns[0];readManifestvalidates root-relative paths before touching the filesystem;plan.mjspre-seeds blocks fromdeployed/verifiedpages as converted;done-check.mjs --trackvalidates the track grammar strictly instead of falling back to the untracked verdict.
Issues
🚨 Critical (Must Fix Before Merge)
(none found)
⚠️ Important (Should Fix)
(none found)
💡 Minor (Nice to Have)
-
plugins/stardust/skills/deploy/scripts/publish-guard.mjs:29-31— A whitespace-onlytrackstring in a hand-edited ledger line is added to the open set as"".- Why it matters: Line 29 checks
!l.track, which is truthy for" "; line 30 then trims it to""and adds""toopen. Alone,[...open][0] || nullreturnsnull, but if a valid passx1is also open,open.sizebecomes2and throwsmore than one extend pass is open (, x1). Checkingif (!track) continue;after trimming avoids adding empty keys. - Suggested fix:
const track = String(l.track).trim().toLowerCase(); if (!track) continue;
- Why it matters: Line 29 checks
-
plugins/stardust/skills/deploy/scripts/publish-guard.mjs:53-54— The guard file's# pass <track>header is compared case-sensitively against the lower-casedopentrack.- Why it matters:
openExtendPassnormalizes ledger tracks with.trim().toLowerCase(), andextend-roster.mjs publishlower-casestrackwhen writing the header, so normal runs always match. Normalizingownerwith.trim().toLowerCase()keeps the reader consistent withopenExtendPassif a guard header is ever checked or edited with uppercase letters (e.g.# pass X1).
- Why it matters:
-
plugins/stardust/skills/replica/scripts/extend-roster.mjs:295-306—also.pathscan authorize a roster page's destination without a unitoutputrecord.- Why it matters:
extend-roster.mjsdocumentsalso.pathsas "a NEW fragment the pages need" and holds any file at a roster page's destination that no unit recorded (outputenforces the separation by rejecting non-roster pages and directing fragments toalso.paths). InbuildGuard(),also.pathschecksreservedand destination collisions, but does not checkpages.has(dest)when no unit recorded an output for that roster page yet — so putting/visit.htmlintoalso.pathsbeforeoutputruns succeeds and authorizes a roster page outsideoutputs/<unit>.paths. Refusingpages.has(dest)foralso.pathsentries would keep the contract symmetric withoutput.
- Why it matters:
-
plugins/stardust/skills/rollout/scripts/plan.mjs:84— Unused local variablepending.- Why it matters:
const pending = ['pending', 'stale', 'failed'].includes(p.delivery && p.delivery.status);is computed on every loop iteration and never referenced (dead code).
- Why it matters:
-
plugins/stardust/skills/replica/reference/extend-pass.md:93—foundation-freeze.mjs freeze --paths contenthashes every non-dot file undercontent/, whileopening.pathslists*.htmlfiles.- Why it matters: In practice
content/holds.htmldocuments (and dot-files like.deploy-allowand.deploy-ledger.jsonare skipped byfoundation-freeze.mjs), so this works cleanly. If a project happens to store a non-HTML file (or a dot-directory containing.html) undercontent/,content-freeze.jsonandopening.pathscover slightly different sets. Worth noting or keeping in mind if non-HTML assets ever live undercontent/.
- Why it matters: In practice
Recommendations
- All blocking items from earlier review rounds (F11–F20,
also.pathscollision bypass, multi-open-pass ledger fail-closed, pre-extend startopening.pathssnapshot ordering,select --namednon-http(s) URL refusal, and--state-relative deploy ledger resolution) have been cleanly resolved and verified with regression tests. - Re-run the two new evals (
replica-extend,replica-extend-noop) once after merge or in CI to confirm the final8e98001bopening sequence (opening.paths+content-freeze.jsonbeforeextend start) against a live agent session.
Assessment
Ready to merge? Yes
Reasoning: The implementation matches the PR plan and closes every blocking issue from previous review rounds with strong fail-closed guards, atomic file handling, and thorough unit + composition tests (all 8 changed/added suites and lint:stardust pass). Only minor polish items remain, none of which block merge.
Review generated by gh pr-review · model: github-copilot/gemini-4-neon
The scripts index stays under its 12,288-byte cap: the extend-roster line names its three subcommands only, and three of main's lines lose words, but no flag and no exit code.
… a roster page in also.paths Fixes from the review of 8e98001 on #823. - publish-guard.mjs: an `extend start` line without a track is an open pass that no guard can name. ledger.mjs writes such a line when --track is missing or blank, and the deployer then saw no pass and sent every document. deploy-batch.mjs, localize-links.mjs and publish now refuse, and name the `extend end` line that clears it. - extend-roster.mjs publish: an also.paths entry at a roster page that no unit recorded is refused. A page is published through `output`. - plan.mjs: remove a value that was computed and never read. - extend-pass.md: the two rules above, and what the closing report does not cover (a document below a dot-directory).
|
Reply to review 6089404296 (on I checked each of the five minor findings against the code first.
The merge of
|
|
claude: approved on 2c0e8c8 This pull request adds an extend pass to The last AI review (claude, on The only commit since then,
I checked Checks:
Redundant lines: none. The only instruction line changed since the last review is the stale-manifest sentence in |
|
codex: approved on 2c0e8c8 The latest commit fixes the remaining write-before-refusal case: unreadable content now stops opening before the foundation manifest changes. All 15 extend-pass checks, 217 repository tests, and Stardust lint pass. Validation and release checks pass on both trees; all four clients load 16/16 skills. No new blocking defect found. No agent eval rerun: the instruction change only repairs a missing phrase. Redundant lines |
paolomoz
left a comment
There was a problem hiding this comment.
@catalan-adobe four bugs inline. Two of them (the link map and the --content lookup) let the publish guard fail open, so those are the ones to fix first.
Prose: about 110 of the 275 lines of extend-pass.md are fixed sequences and decision tables, not judgment. My recommendation is one extend-pass.mjs that owns them:
status: the Entry table (ledger line, flow, spec line, URL site, flags give: state report, resumex<N>, openx<N+1>, or refuse). The caller's ledger-line table becomes its output.open: the Opening block and its resume rules, idempotent. The foundation bug inline shows why: a script runs the check every time, and tests can cover it. Today only the evals reach the opening and the closing.close: the end sequence (content check,done-check --track,handoff end, spec check,extend endwith its detail, then removing the guard), plus the two early closes (rejected, 0 pages).- The § 1 spec restore loop as a
foundation-freeze.mjsrestore option, and the E2 relink list as alocalize-links.mjs --openingflag.
Guard: the doc asks the agent to run publish at five points (handoff start, after each output, before each deploy, before autofix-aem.mjs and before da-library.mjs). If those scripts refresh or check the guard from $X/outputs/*.paths themselves, most of the § 4 guard bullets go and the step can't be missed. Script internals the agent can't act on (hard links, the lock, dot-entries, commas in URLs) can go too; the error messages already carry them.
Stays prose: new page types, migrate unit order and the sibling tier, module matching against the frozen DESIGN.json, foundation requests, the header re-exploration and the owner report. That takes the doc to roughly 170-190 lines.
Can you fix the four bugs here and take the script split as a follow-up?
| const guarded = (f) => allow && !allow.has(`/${path.relative(opts.content, f).split(path.sep).join('/').replace(/\.html$/, '')}`); | ||
| const held = []; | ||
| // buildMap keeps the last file of a URL: the listed documents go last, so a held draft never takes a pass page's URL | ||
| const { map, redirects, pending } = buildMap([...files.filter(guarded), ...files.filter((f) => !guarded(f))], opts.content, opts.redirects); |
There was a problem hiding this comment.
While the guard exists, buildMap still maps every file under --content, including the new documents the pass holds (an owner's draft, a roster page no unit recorded). A pass page linking to https://<source>/new-offer.html is rewritten to /new-offer, deploy-batch never sends the draft, and the published page has a 404 where it used to keep a working absolute link.
Older documents are live, so they should stay link targets; new documents the guard doesn't list (not in opening.paths) should not.
There was a problem hiding this comment.
Confirmed. I reproduced it with both kinds of held document: an owner's draft and a roster page that no unit recorded. The pass page's links became /new-offer and /unrecorded, and neither document is sent.
Fixed in 1f97976a. While a pass is open, a link target is a document the guard lists, or one that existed when the pass opened (opening.paths). A link to a new document that is held stays absolute. Older documents are still targets.
The localizer now needs opening.paths during a pass. If the file is missing, it exits 1 and writes nothing. Without a guard and without an open pass, nothing changes.
A new check in extend-roster.test.mjs runs the real localizer on both cases. With the fix removed, it fails.
| if (open.size > 1) throw new Error(`more than one extend pass is open (${[...open].sort().join(', ')}) — nothing was sent or written; close the earlier pass with its \`extend end\` line first`); | ||
| return [...open][0] || null; | ||
| } | ||
|
|
There was a problem hiding this comment.
The ledger and the guard are both found from --content (<content>/../stardust/status.jsonl, <content>/.deploy-allow), so the guard fails open when --content isn't the project's content/. With x1 open, deploy-batch.mjs --content content/en --force finds no ledger, publishGuard returns null, and every older /en/* document is sent.
What about finding the project root on its own (walk up to the directory holding stardust/status.jsonl), and refusing when a pass is open and --content isn't the directory the guard was written for?
There was a problem hiding this comment.
Confirmed. With x1 open, --content content/en found no ledger, and in my test deploy-batch.mjs sent the page below it. A copy of the content tree further down the project was read as unguarded too.
Fixed in 1f97976a, as you suggest. publish-guard.mjs now walks up from --content to the nearest directory that holds stardust/status.jsonl. While a pass is open, it refuses a --content that is not a directory directly under that project. So content/en, a nested copy and the project root are all refused, by deploy-batch.mjs, localize-links.mjs and publish.
Two notes on the rule:
- It compares the directory's place, not a path that the guard records. The guard file records no directory, and
--contenttakes any name. - Symbolic links work both ways. One case is a link to the content directory from outside the project. The other is a
contentlink that the project holds to a tree kept elsewhere. Each has a test.
One limit remains. A copy of the content tree outside the project has no ledger above it. So no pass is found, and the copy is sent as on main. I added it to the known limits.
| // a named url is refused on a delivered or document destination even when it is captured too (checked first) | ||
| if (named && delivered.has(dest)) { refused.push({ url, why: `delivered at ${dest} (coverage)` }); continue; } | ||
| if (named && docs.has(dest)) { refused.push({ url, why: `an existing content document holds ${dest}` }); continue; } | ||
| if (captured.has(dest)) { dropped.push({ url, why: `already captured (${dest})` }); continue; } |
There was a problem hiding this comment.
A page the owner names with --extend that the first run captured but never delivered (no coverage row) is dropped here instead of refused. urls.txt comes out empty and the pass closes with 0 new pages found by discovery, which isn't what happened; the only trace is a dropped line on stderr.
In --named mode it should either join the roster or be refused with its reason.
There was a problem hiding this comment.
Confirmed: exit 0, an empty urls.txt, and the reason only on stderr.
Fixed in 1f97976a: with --named, such a page is refused with its reason, exit 2, and nothing is written. The --extend preflight runs the same call, so the request is refused before a pass opens.
I chose the refusal, not the roster, for three reasons:
selectreserves every captured destination inreserved.paths, sooutputrefuses the page's document.- The crawl of the pass runs with
--skip-capturedand does not capture the page again. - A captured destination can be the redirect target of a delivered page. The roster then delivers that page a second time.
This leaves a gap that I added to the known limits. A pass cannot deliver a page that an earlier run captured and never delivered. --extend refuses it, and --extend-next still drops it, as before.
| SPEC="PRODUCT.md DESIGN.md DESIGN.json stardust/current/PRODUCT.md stardust/current/DESIGN.md stardust/current/DESIGN.json" | ||
| for f in $SPEC; do [ -f "$f" ] && mkdir -p "$X/spec/$(dirname "$f")" && cp -p "$f" "$X/spec/$f"; done # the opening bytes | ||
| $F freeze --paths-if-present "$(echo $SPEC | tr ' ' ,)" --out $X/spec-freeze.json # a missing one is recorded absent | ||
| $F freeze --from stardust/rollout/foundation-freeze.json --out $X/foundation-freeze.json # the pass's own, as delivered |
There was a problem hiding this comment.
freeze --from re-hashes what is on disk and then replaces stardust/rollout/foundation-freeze.json. An edit made after delivery (a local change to styles/styles.css, say) becomes the delivered baseline, and C-final's check reports foundation unchanged while the pass pushes it.
Run $F check --manifest stardust/rollout/foundation-freeze.json before the re-freeze (exit 1 is a blocked line), and add the foundation paths to the opening's git status --porcelain.
There was a problem hiding this comment.
Confirmed. I edited styles/styles.css after delivery: check exited 1 before the opening's re-freeze, and 0 after it.
Fixed in 1f97976a, in the contract:
- The opening runs
foundation-freeze.mjs checkfirst. On exit 1 it stops, names the lines and writes nothing. The owner reverts the file, or records the change withfreeze --from. The pass never does. - The re-freeze is gone from the opening, not moved behind the check. After a passing check it changed only
frozenAt. The pass's ownx<N>/foundation-freeze.jsongoes with it. The delivered manifest stays the baseline of every unit check. - C-final freezes again with
freeze --from, only when it applied a foundation request. Without it, the next opening stops on the pass's own change.
I did not add the foundation paths to git status --porcelain. I measured check against it on six cases. Three are an edit: uncommitted, staged and committed. The others are a new untracked file, a deleted file and a renamed one. check exits 1 on all six. git status misses the committed edit.
Two limits:
- This is contract text, so no unit test covers it. My end-to-end script and a fresh agent session do. That supports your point about a script that owns the opening.
- A project whose first run applied a foundation request and did not freeze again now stops at the opening.
main's contract does not say to freeze again, though its check at each unit end forces it. Two delivered projects that I checked, one of them made bymain, pass the check.
Fixes the four findings of review 6113697153 on #823. - publish-guard.mjs: the project is the nearest directory, at or above --content, that holds stardust/status.jsonl. While a pass is open, a --content that is not a directory directly under that project is refused: `--content content/en` found no ledger and sent every older document below it. - localize-links.mjs: while a pass is open, a link target is a document the guard lists or one of the pass's opening.paths. A new document the guard holds is never sent, so a link to it stays absolute. A missing opening.paths exits 1 with nothing written. - extend-roster.mjs select --named: a page an earlier run captured and never delivered is refused with its reason, not dropped into an empty roster. - extend-pass.md: the opening runs `foundation-freeze.mjs check` and stops on exit 1. It no longer freezes the foundation again, which made an edit after delivery the baseline. C-final freezes it again only when it applied a foundation request.
|
Reply to review 6113697153 (on I reproduced all four before changing anything. The two that let the guard fail open came first: the What changed
Two limits came out of this, and both are in the description now. A copy of the content tree outside the project is not guarded. A pass cannot deliver a page that an earlier run captured and never delivered. Tests
The script splitYes: the split is a follow-up, and it is not in this pull request. The foundation bug supports it. That fix is contract text, so no unit test covers it. Three things I found that the follow-up can use:
This round changed the contract from 275 to 281 lines. |
The scripts index stays under its 12,288-byte cap: the extend-roster line takes main's new short form.
|
@paolomoz the four bugs are fixed in
|
Four files conflicted with the reskin handoff (#531). Both sides are kept. - crawl.mjs: the usage line lists main's --consent-overlays and the extend pass's flags. - done-check.mjs: doneGaps takes main's sourceUrl404 and this branch's track. - handoff-contract.md: row C is main's text, with the one phrase on the extend pass's own C-deliver pair. - scripts-index.md: main's rewritten lines, plus the extend-roster line. The rollout lines take the short form main uses for spec/ and stardust/, so the file stays under its 12,288-byte cap. No flag, exit code or script is dropped.
paolomoz
left a comment
There was a problem hiding this comment.
@catalan-adobe thanks for the fixes. The --named refusal holds. Two things block the merge, both inline: the foundation stop came in with 1f97976a, the guard one was already in the PR.
Why we didn't see them before: both are about what one run leaves for the next, and my review followed a single pass from opening to close. The foundation stop comes from my own suggestion: I assumed stardust/rollout/foundation-freeze.json matches what's live, but the first run's C-final applies foundation-requests.md and never re-freezes. The re-freeze you removed was hiding that. The guard one only shows when x2 opens after x1, and the tests and evals run one pass.
Test: this is the case for the open / close split. A test that runs a first run with one applied foundation request, then x1 and x2, catches both. Can you add that test here along with the two fixes?
| ## Opening — idempotent on the open track | ||
|
|
||
| `git status --porcelain -- content/` must be empty (else stop: an uncommitted content edit is the owner's to | ||
| settle). `foundation-freeze.mjs check` must exit 0 (else stop, and name its lines: a foundation file changed since |
There was a problem hiding this comment.
This stops every pass on a project whose first run applied a foundation request. handoff-contract.md row C applies foundation-requests.md at C-final and never runs freeze --from, so check reports the delivered CSS as changed after delivery, and the first fix it offers the owner (revert the file) would undo live changes.
What about adding freeze --from stardust/rollout/foundation-freeze.json to row C's C-final when a request was applied, as the pass's own C-final already does? Projects delivered before that change still need a way through, for example checking the opening against the foundation at the commit of the first run's C-deliver end.
There was a problem hiding this comment.
Confirmed. I built a first run that applies one request at C-final and does not freeze again, as row C said. The opening's check exits 1 on it with changed styles/styles.css, and nothing changed after the delivery. Reverting that file brings the removed rule back.
Fixed in a899adef, both parts as you suggest:
- Row C. C-final now runs
freeze --from stardust/rollout/foundation-freeze.jsonafter it applied the queued requests. - Projects delivered before that. The opening now compares the foundation with what the delivery commit holds. If every differing file is the same there as in the tree, the manifest is only older than the delivery. The opening then freezes it again from its own paths and opens. An edit after the delivery still stops it, committed or not.
One difference from your example: the commit it reads holds the run's closing ledger line, not the C-deliver end. That line is handoff end without a track, or the last extend end. Two reasons:
- A first run can still change a frozen file after
C-deliver end: theheader_parityremedy fixes the header block. - After pass
x1, the baseline is whatx1delivered, not the first run.
The opening finds that commit with git blame on the ledger line. If git cannot say (a shallow checkout, or a closing line that is not committed) and the foundation differs, it stops and says so.
The opening is now extend-pass.mjs open. The new extend-pass.test.mjs runs this case first: a first run with one applied request and no freeze, then x1 opens. Its other checks cover an edit after the delivery in four forms: uncommitted, committed, a new file and a deleted file.
| `done-check.mjs --track x<N>` exit 0 — the pass's own `I-dashboard end`, never an earlier pass's — `replica | ||
| handoff end --track x<N>`, `$F check` on the spec manifest, `replica extend end --track x<N> --detail | ||
| "<n> pages delivered (x<N>), <total> live[; <n> older documents not relinked (relink-pending.txt)]"`. Only | ||
| then `rm content/.deploy-allow`, the last step of the pass. A pass that ends before Phase 5 (rejected, or 0 new |
There was a problem hiding this comment.
content/.deploy-allow is committed with the checkpoints (line 210), but this rm is never committed. The next opening then sees D content/.deploy-allow in git status --porcelain -- content/ and stops, so x2 can't open after x1. A clone of the last checkpoint also keeps a guard that names a closed pass, and deploy-batch.mjs refuses there.
My recommendation is to commit the deletion as part of this last step; the alternative is to never commit the guard and have the opening ignore it.
There was a problem hiding this comment.
Confirmed, both parts. After x1 closed as the contract said, git status --porcelain -- content/ reads D content/.deploy-allow. A clone of the last checkpoint holds the guard, and deploy-batch.mjs refuses there: the guard names a closed pass.
Fixed in a899adef, your recommendation. The last step is now extend-pass.mjs close. It writes extend end, removes the guard, and commits the ledger and that removal. The commit holds those two paths only, so other staged work stays out of it. It does not push.
Three more things came out of this:
- Passes closed before this change. Their guard is committed and its removal is not. So the opening no longer counts the deploy scripts' own files under
content/as an owner's edit. Those are.deploy-allow,.deploy-ledger.jsonand.deploy-log.jsonl. - The same stop had a second cause.
deploy-batch.mjswrites its ledger and its log undercontent/by default. A re-deploy after the last checkpoint left them changed, and that stopped the next opening too. My local run found it. - A close that is cut short.
extend endis on the ledger before the commit. If the commit fails, the same command again removes a guard that is still there and commits.
I did not take the alternative. It works: I tried it, and a clone of an open pass then fails closed until publish writes the guard again. But it needs a new ignore rule for a file under content/. The template that Setup writes covers stardust/ only. Passes that ran before the rule have a tracked guard anyway. The commit covers both.
extend-pass.test.mjs runs x1 to its close, checks that the tree is clean and that a clone holds no guard, then opens x2.
…uest, and x2 after x1 Fixes the two findings of review 6131724174 on #823, with the test it asks for. The opening and the end of a pass are now one script, so a test can run a first run, then x1, then x2. - extend-pass.mjs (new): `open` and `close`. - open: a delivered manifest that is only older than the delivery no longer stops the pass. A first run applies its foundation requests at C-final and did not freeze again. `open` reads what was delivered from the commit of the closing ledger line. When every differing file is the same there as in the tree, it freezes the manifest again. An edit after the delivery, committed or not, still stops. - open: the deploy scripts' own files under content/ (.deploy-allow, .deploy-ledger.json, .deploy-log.jsonl) are not an owner's edit. - close: it removes the guard and commits that removal with the `extend end` line. The next opening and a clone of the last checkpoint start clean. - handoff-contract.md row C: C-final runs `freeze --from` after it applied the queued requests. - foundation-freeze.mjs: `drift()` is the comparison of `check`, without output. - extend-pass.md: the opening and the end call the script. - scripts-index.md: one line for the new script. The deploy, diff, extract, migrate and qa lines take the short form of spec/ and stardust/, so the file stays under its cap. No flag, exit code or script is dropped.
`open` read the content tree and the spec after its first writes. A project without content/, with a dangling link in it, or with none of the six spec files left a half-made pass directory, and in the last case an `extend start` line. It now reads the whole snapshot and checks the spec files before the first write. Each of the three cases stops with exit 1 and nothing written.
|
Reply to review 6131724174 (on I reproduced both before changing anything. You are right about the cause: my tests and my local run followed one pass, and the re-freeze I removed hid the first one. The testIt is in this pull request: A test needs something to run. So the opening and the end are now one script: I wrote the test first and saw every check fail. Then I removed 15 lines of the script in turn, and each removal made at least one check fail. What else changed
Checks
|
| function commitClose(track, detail) { | ||
| const paths = [LEDGER, GUARD].filter((p) => git('ls-files', '--error-unmatch', '--', p).code === 0); | ||
| if (!paths.length || !gitOk('status', '--porcelain', '--', ...paths).trim()) return; | ||
| gitOk('commit', '-q', '-m', `replica extend ${track} end: ${detail}`, '--', ...paths); |
There was a problem hiding this comment.
claude: close runs git commit in the user's checkout. It commits only the ledger and the guard, and it never pushes. This is a new script with a side effect on the repository, but the PR description still lists extend-roster.mjs as the only new script, and still calls the open/close split a follow-up (#848). Please call out extend-pass.mjs and its local commit in the description (AGENTS.md, Security: call out a new script).
There was a problem hiding this comment.
The description names it now:
extend-pass.mjsis listed under the new scripts.- It says that the script runs
gitin the project, and thatclosemakes one local commit and never pushes. - The limit about stardust:replica: move the extend pass's fixed sequences from extend-pass.md into an extend-pass.mjs #848 is reworded. The opening and the end are in the script. The entry decision, the spec restore and the relink list stay in stardust:replica: move the extend pass's fixed sequences from extend-pass.md into an extend-pass.mjs #848.
I updated the description right after the push of 0cae80a4, when this review had started. So it read the earlier text.
| not count. | ||
| - **A foundation file changed since the site was delivered,** committed or not: the pass's checkpoints would push | ||
| it. The message names each file. The owner reverts it, or records it as delivered with | ||
| `$F freeze --from stardust/rollout/foundation-freeze.json`; the pass never does. A manifest that is only older than |
There was a problem hiding this comment.
claude: A word is missing: "A manifest that is only older than (a first run applied …)" should read "only older than the delivery".
There was a problem hiding this comment.
Fixed in 2c0e8c80: "only older than the delivery". A re-wrap of mine dropped the two words.
| const dirty = gitOk('status', '--porcelain', '--', 'content/').split('\n').filter((l) => l.trim() && !/^content\/\.deploy-[^/]*\/?$/.test(l.slice(3))); | ||
| if (dirty.length) stop(`uncommitted changes under content/ — the owner settles them first; nothing was written\n${dirty.map((l) => ` ${l}`).join('\n')}`); | ||
| if (!SPEC.some((f) => existsSync(f))) stop(`none of the six spec files exists (${SPEC[0]} … ${SPEC.at(-1)}): not a delivered replica run — nothing was written`); | ||
| const note = await foundationAsDelivered(lines, state.last, freezer); |
There was a problem hiding this comment.
claude: foundationAsDelivered can rewrite stardust/rollout/foundation-freeze.json (line 105) before two later stops: the check that content/ exists (line 154) and the snapshot read (line 155). On a project with a stale manifest and no readable content/, open says "nothing was written" but has already re-frozen the manifest. The re-freeze is legitimate, so this is minor, but the message is wrong. Moving the content/ check and the snapshot read above the foundation step would make the claim true.
There was a problem hiding this comment.
Confirmed. On a project with a manifest older than the delivery and no content/, open froze the manifest again and then stopped with "nothing was written".
Fixed in 2c0e8c80, as you suggest. The content/ check and the snapshot read now come before the foundation step. That step is the last stop and the first write.
The test covers it. The check for an unreadable content tree now uses a project with such a manifest. It asserts that the manifest is byte-identical after the stop. With the old order it fails.
…zes the manifest From the AI review of 0cae80a on #823. - extend-pass.mjs open: on a project whose manifest is older than the delivery and whose content/ cannot be read, `open` froze the manifest again and then stopped with "nothing was written". The content check and the snapshot read now come first. The manifest step is the last stop and the first write. - extend-pass.md: a missing word, "only older than the delivery".
|
@paolomoz both findings are fixed, with the test you asked for. Can you look again?
|
What and why
Fixes #812. A replica run that reached
replica handoff endhad no way to deliver more pages of the same site. This adds an extend pass:The contract is in
skills/replica/reference/extend-pass.md.SKILL.mdgains the two inputs and Setup step 0.One rule keeps the pass small: a pass never sends a document under
content/that existed at its opening, and its localizer never rewrites one. That covers the pages, the nav, the footer and the fragments. It does not cover the block library under/library/in DA:da-library.mjsgenerates that catalogue from the delivered pages and sends it whole in each pass. Older pages that link to the source site for a newly delivered page keep those links. The pass lists them inx<N>/relink-pending.txtand names the count in its report. Relinking and re-publishing older pages is a separate change. This pull request supersedes #813, which did that work inside the pass. The head of #813 (3f2bd07d) keeps that work.extend-pass.mdopens with the contract for a person or a system that runs the skill unattended. A restart is the same command sent again. The state is one ledger line,ledger.mjs last replica. A refused request writes nothing. A blocked line says what to do next. Only a full first run can be extended: a page list on the first run makes a pilot.ledger.mjs last replicadecides first. Afterhandoff endwithout--extend*, the agent renders the state report and stops. Replica writes nothing. The master skill's Setup has already refreshedstardust/scripts/, as onmain. With--extend*it opens passx<N>. An open pass is resumed first. The opening refuses another flow, a pilot, another site's URL and malformed flags. A pilot is a project whosedirection.mdspec line startsSynthesized (bounded-single):; a line that startsPromoted:is a full run. It also refuses an--extendURL with a query string. Every ledger line of the pass carries--track x<N>.ledger.mjsgains the replica phaseextend.replica/scripts/extend-pass.mjs, withopenandclose. A test runs a first run, then passx1, then passx2, in a real git project.opencopies the six spec files intox<N>/spec/and freezes them.checkruns after the extract, andcloseruns it again: a changed spec keeps the pass open.content/or without a spec file, on an uncommitted change undercontent/(the deploy scripts' owncontent/.deploy-*files aside), and on a foundation file that changed since the site was delivered, committed or not.main's contract never froze again after that.openreads what was delivered from the commit that holds the closing ledger line. When every differing file is the same there as in the tree, it freezes the manifest again and opens. Row C ofhandoff-contract.mdnow tells C-final to runfreeze --fromafter it applied the requests, as the pass's own C-final does.crawl.mjs --max 0 --skip-captured stardust/state.json --select-only. The newreplica/scripts/extend-roster.mjs selectkeeps the ones whose EDS destination is free. A destination is taken when a captured page, a coverage row or an existing content document holds it. Captured pages include a redirect's final URL, read from the capture records as the crawler reads them. A document that a deploy ledger records as sent takes it too.--reserved-outrecords every taken destination inx<N>/reserved.paths.urls.txtis written last, and only on success. A page named with--extendis never dropped into a shorter roster: one whose destination is delivered, an existing document, or captured by an earlier run is refused with its reason.--pages-file <roster>with--skip-captured. It runs Phases 1, 2, 2.5 and 6 plus prep typing and slots, never Phases 3–5.<unit>-x<N>, anddoneunits are never reopened. Each pass gets its own C-deliver pair.done-check.mjs --track x<N>ends the pass.extend-roster.mjs publishwritescontent/.deploy-allow: the DA paths of the pass's own documents.migrate.mjs renderwritesstardust/migrated/, so the guard stays empty during migrate. Right after the conversion writes acontent/document, the unit records it withextend-roster.mjs outputand runspublishagain. A new fragment is one line inx<N>/also.paths. While the guard file exists:deploy-batch.mjssends only the documents it lists, with or without--force. A--pathsentry it does not list exits 2 before any request, its file on disk or not.localize-links.mjsrewrites only the documents it lists. A link target is a document it lists, or one that existed when the pass opened (opening.paths). A new document that is held, such as an owner's draft, is never sent, so a link to it stays absolute. Where a listed document and an older one claim one URL, the listed one is the target.--jsonnames the others inheld.handoff-contract.md§ 2 runs as written there. No caller passes a new flag.outputandpublishrefuse a file at a destination ofreserved.paths, and a symbolic or hard link. They hold and name an owner's draft.publishkeeps one file per destination, and refuses a second one, listed inalso.pathsor not. It also refuses analso.pathsentry at a roster page that no unit recorded: a page is published throughoutput.publishworks under a lock, so units can run it at the same time.publishstops on a second file at a pass page's path, such asvisit.htmlbeside the recordedvisit/index.html.autofix-aem.mjsandda-library.mjsread the first file that matches, so the contract runspublishbefore each.--content: the nearest directory, at or above it, that holdsstardust/status.jsonl. While that ledger shows an open extend pass and the guard file is missing, they send and write nothing. They also refuse a--contentthat is not the project's content directory, such ascontent/en. The guard names its pass. A guard that names another pass, or none, is refused too, and only the open pass can runpublish. A ledger that shows two passes open at once is refused by all three scripts. So is anextend startline without a track, whichledger.mjswrites when--trackis missing. The shared check is the newdeploy/scripts/publish-guard.mjs.deploy-batch.mjssends every page and fragment, a single document too. The hand-written PUT thathandoff-contract.md§ 2 permits is not used: it does not read the guard. An older document that needs a repair is ablockedline for the owner.extend start,openwritesx<N>/opening.pathsandx<N>/content-freeze.json: every content document on disk with its sha256, git-ignored ones too.select --openingkeeps their destinations reserved, also for a file that has left the tree since. Once the pass is open, the snapshot is never made again: if it is missing, the pass is blocked.foundation-freeze.mjs checkoncontent-freeze.jsonnames each opening document that changed or went missing on disk, tracked by git or not. It skips dot-entries, so an edit to a document below a dot-directory is not in the report. The pass still never sends such a document. The pass reports them and never restores them.closewritesextend end, removes the guard, and commits the ledger and that removal in one commit of its own two paths. So the next pass opens on a clean tree, and a clone of the last checkpoint holds no guard.closenever pushes.Changes to normal runs (outside an extend pass)
deploy-batch.mjs,localize-links.mjs: the guard above. Withoutcontent/.deploy-allowand without an open extend pass on the ledger, both behave exactly as onmain.da-library.mjs,rollout/lib.mjs,contracts.mjs,lib/: unchanged frommain.crawl.mjs: every new behaviour applies only under--skip-captured,--select-onlyor--link-first. A plain capped extract selects exactly as onmain. Under--skip-captured:--pagesis exact: the entry page is not added.www.,/index.htmlandhttp/httpsfold into one source identity. Query strings stay part of it.--reserve-slugs <file>names slugs no new page may take.--max 0lists every uncaptured candidate in order.--pages-file <file>: one URL per line, exclusive with--pages.Two changes apply to every run. The crawl log's
discoveryalso recordsselectionandmax._crawl-log.jsonappends each run toruns[], with the latest fields still at the top level.ia-extraction.md§ Incremental re-runs names--skip-capturedfor an extract re-run. It never applies with--refresh/--refresh-all.plan.mjs: blocks of pages whose delivery status isdeployedorverifiedcount as converted for every run. A first rollout plans exactly as before. A resumed rollout whose representativefailedwhile a sibling wasdeployednow getsreusefor the sibling's blocks. Pinned in the newplan.test.mjs. One line that computed a value nobody read is removed.done-check.mjs: new--track <name>. Without the flag the verdict is unchanged.foundation-freeze.mjs: new--paths-if-presentand--from <manifest>. Plain--pathsis unchanged. New exportdrift(): the comparison ofcheck, without output.Known limits
wwwentry,--extend-nextdoes not find a page that only the apex host links.mainfilters the sitemap and the links by the literal origin in the same three places. Naming the page with--extendworks.publishis not caught beforeautofix-aem.mjsorda-library.mjsreads it.--content. A copy of the content tree outside the project has no ledger above it, so it is sent as onmain.--extendrefuses it with that reason, and--extend-nextdrops it.extend-pass.mjscovers the opening and the end. The entry decision (resume, open or refuse), the spec restore and the relink list are still contract text: stardust:replica: move the extend pass's fixed sequences from extend-pass.md into an extend-pass.mjs #848.closecommits locally. If that commit fails, theextend endline is already written: the same command finishes the close.stardust/migrated/as the earlier passes committed it.inventory.mjsdrops the coverage row of a delivered page whose migrated file is missing, as it does onmain.main.Evals
evals/replica-extend/: a delivered one-page run extended with--extend-next 1. It covers the opening, the freezes, the roster before capture, no re-capture, and the type routing. Its fixture holds the migrated home page and its sidecar, written bymigrate.mjs.evals/replica-extend-noop/: the same project resumed without flags. Nothing is written or re-run, the refreshed script copies aside.New script / flag / endpoint: two new scripts,
replica/scripts/extend-roster.mjsandreplica/scripts/extend-pass.mjs, and one new library without a CLI,deploy/scripts/publish-guard.mjs. All three read and write local files only.extend-pass.mjsalso runsgitin the project: it reads the status, the history of the ledger and the delivered files, andclosemakes one local commit. It never pushes. The new flags all read local files only:crawl.mjs:--skip-captured,--reserve-slugs,--pages-file,--skip-failed,--first-run-order,--select-onlyfoundation-freeze.mjs:--paths-if-present,--fromdone-check.mjs:--trackThe guard file only narrows what
deploy-batch.mjsalready sends. There is no new hook, MCP server, host or endpoint.How I checked it
npm ci && npm run validate && node scripts/check-release-configs.mjs: pass, 44 configs and 0 broken.npm test: 217/217.npm run lint:stardust: clean.npm run plugins:check: clean.qa/.../dropdown-unreachable.test.mjs,reskin/.../figma-gate.test.mjsandreskin/.../stream-render.test.mjs. All three need a browser and fail the same way onmain.extend-pass(new, 15),extend-roster(new, 30),deploy-batch(17),localize-links(11),crawl(58),foundation-freeze(22),done-check(31),plan(new, 5),ledger(35).extend-roster.test.mjsruns the realdeploy-batch.mjsandlocalize-links.mjson the guard thatpublishwrites. It asserts the PUT paths at a fake DA and the bytes of the older documents.--pathscheck, the URL precedence, the captured reservations, the link checks, the lock, the alias report, the guard's pass name, the colliding file, the opening snapshot, the capture records, thealso.pathscollision, the two-open-passes refusal, the track case, the non-http named URL, the ledger directory, the pass without a track, the roster page inalso.paths, the--contentcheck, the project lookup, the link targets, the missingopening.paths, the named captured page, and 16 lines ofextend-pass.mjs(the way through for an older manifest, the stop on an edit after delivery, the commit of the guard's removal, the resume rules, the order of the stops before the first write). Each time at least one suite failed.check-skills --tokens: replica is at 4,833 of 5,000 tokens.origin/mainis merged in ata4883e92, with feat(stardust): a delivery unit closes only when every page it shipped has a gate row #788, fix(stardust): deploy-batch fails a page when a request gets no answer #831 and the reskin work (feat(stardust): reskin takes a Figma donor — headless capture, deterministic curation #439, feat(stardust): reskin checks a page against its Figma donor and on its aem.page preview (M2) #464, feat(stardust): reskin hands off to migrate — renderer, canon bridge, chrome hardening (M3) #531). The last merge had four conflicts with feat(stardust): reskin hands off to migrate — renderer, canon bridge, chrome hardening (M3) #531, and both sides are kept: the usage line ofcrawl.mjs, the arguments ofdoneGapsindone-check.mjs, row C ofhandoff-contract.md, andscripts-index.md.mainalone is at 12,283 of 12,288 bytes. To add the two lines forextend-roster.mjsandextend-pass.mjs, this pull request shortens the title, and writes 44 lines (deploy/,diff/,extract/,migrate/,qa/,rollout/) in the short form thatmainuses forspec/andstardust/(— what: flags). Only the separator changes: every code span and every exit note ofmain's file is kept. The index is now at 12,271 bytes.prose-delta.mjs: +298 lines, +3,866 words. Almost all of it isextend-pass.md, read only when a run extends.replica-extendfixture. The run used the local fixture site, Playwright and a fake DA:/visit/only, andreserved.pathsis/.index.jsonbyte-identical, and a resume prints0 new pages.migrate.mjs renderwritesstardust/migrated/visit/index.htmland nothing undercontent/. Anoutputbefore the conversion is refused.--forcedeploy each PUT the two pass documents only.--force --paths /indexexits 2 with zero PUTs.--forcebatch with the guard kept PUTs the two pass documents only, after an owner edited the home.publish.extend endthe leftover guard authorizes nothing. Once it is deleted, both scripts behave as onmain.piwithgithub-copilot/claude-opus-5.5in an empty home, with the skills of this branch. Each got only the text shown, and I checked each result against the work directory.replica-extend-noop: the session read the ledger, reported the state and wrote nothing.replica-extend: the session opened passx1, froze the spec, selected/visit/before capture, left the delivered page byte-identical, and routed the new type to Phases 3–4.$stardust replica <URL> --extend-next 1 --hands-off. The session opened the pass and ran extract, recreation and the fidelity gate without a question. It stopped at delivery with ablockedline that names what is missing.x1. Neither opened a second pass or ran the crawler.--extend <url>. The session ran the preflight, opened the pass for the named page and went on to delivery.bounded-singlepilot. Each session refused, wrote no ledger line and created no pass directory.x2and closed it with0 new pages found by discovery.extend-pass.mdwithout changing the project.publishathandoff start,outputandpublishright after the conversion, the localizer,deploy-batch.mjs, the forced re-send, E2, G andda-library.mjs. The stand-in received 6 PUTs: the new page twice, one media file and three library documents. It received none for the home, the nav or the footer, and none from a hand-written request. The three older documents are byte-identical on disk and in the stand-in.relink-pending.txtlists the home and the nav.done-check.mjsreportsheader_parity, because the stand-in serves pages without block decoration. The session wrote ablockedline and kept the guard, as the contract says.handoff end, with gates 3/3 at 1440, 360 and wide.x1,--extendwith 3 named pages, reachedextend end. Passx2,--extend-next 2, reachedextend end, with gates 8/8.opening.paths. Those documents are byte-identical on disk and in the stand-in.done-check.mjs --track x<N>exits 0 for both passes, and passx2changed no record of passx1.327da13c.--extend-nexton a site with more pages left than requested.Checklist
npm run validatepasseshumanlabel is set, if a person and not an agent wrote this