Repository navigation
feat(loop): link preview fixture records, and drop preview sign-in - #265
Conversation
preview-auth.mjs becomes preview-host.mjs: accessPlan, authPlan, seedsPreviews and seed are gone, onHost and previewHost stay for review-pr's off-host finding, and fixtureHost reads fixture.link's origin. Removes the previewAccess block and the preview wait settings from loop-config.json, which nothing else reads. Refs #258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds the generic fixture block (path, link, surfacePaths). A repo with it cites or adds fixture entries per changed surface and builds links from fixture.link, never opening the preview; a diff touching no surfacePaths writes No preview surface. Deletes the seed and sign-in steps, the disclosure line and step 7b. A repo without the block keeps plain links and no data rule. Refs #258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Links are checked against fixture.path on the branch and never opened. A surface diff with no cited id, a cited id absent from the branch, and an off-host link are should-fix. Refs #258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
format-ticket and write-ticket add a Verification checklist line in a fixture repo; implement-ticket's pre-mortem covers the entries before code and step 10 points at fixture ids. Refs #258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rewrites the why.md sections on preview data, the red seed check, the poster-written link and the 7b exception, adds the offline fixture section (sydevs/SahajCloud#1078), and replaces the routine-setup preview Access section with a retirement line. Refs #258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Skill changes reach an installed plugin only on a version change. Closes #258 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…re-offline # Conflicts: # workflow/.claude-plugin/plugin.json # workflow/skills/finalize-pr/SKILL.md
Co-Authored-By: Claude Opus 5.5 <[email protected]>
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The diff is smaller than the problem — 682 out, 443 in — and matches #258 clause for clause. The block is config-keyed, no skill names a repo, and nothing rides along. The ladder finds no new layer: preview-host.mjs is the old file renamed with fixtureHost added, and no dependency arrives. What is left is the prose. Three why.md sections still describe the system this PR removes, two of them now cited by nothing, and the body never says what rule-delta reports fell out. One operational note, since a person merges here: land this before sydevs/SahajCloud#1181 and SahajCloud has no fixture block, so finalize-pr falls through to "plain links, no data rule" — the merge order in the body is the whole safety.
Findings
should-fix— the body carries norule-delta.mjsadjudication, which CLAUDE.md asks of a skill rewrite. It reports three: Never print the token (thread below), and two more that read as deliberate — name them and say so.should-fix—docs/why.md:362— two sections cited by nothing, one asserting a rule the skills no longer apply.should-fix—workflow/skills/finalize-pr/SKILL.md:291— the token-printing rule left the repo whilefix-cistill needs it.consider—workflow/skills/review-pr/SKILL.md:93—<path>unexplained, and a dropped check on body-named inputs.
What was checked. #258 and the diff whole. Read on the branch: the five skills, pr-template.md, preview-host.mjs, why.md, routine-setup.md, loop-config.json. node --test workflow/lib/*.test.mjs dispatcher/test/*.test.mjs → 470/470, as the body claims. The retirement grep returns one line, routine-setup.md:464, as claimed. Every why.md# anchor cited anywhere on the branch resolves to a heading. No preview was opened: this repo publishes none and the PR has no ## Preview section.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
`rule-delta` reports **Never print the token** — no `-v`, no `--trace`, never echo the command — dropped from finalize-pr and review-pr by this branch. The preview credential it guarded is gone, but fix-ci step 2 still reads Railway logs with `curl` and a bearer token, carrying only the bare sentence. That spelling lived in one place and this branch deleted both copies, so move it to the one step that still handles a token. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYWpRJKcQmqexwihde
Two gaps the critic found in step 2. `fixture.path` is a directory of one file per collection, and the step told a run to `git show origin/<branch>:<path>` without saying what `<path>` was, so a run had to guess a filename. It now lists the directory first. Step 2 on main raised a `should-fix` for an input the body names that does not exist. This branch dropped that clause while finalize-pr step 7 still asks for those inputs, so nothing checked them in any repo. The clause is back, pointed at the step that asks. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYWpRJKcQmqexwihde
This branch removed every citation of *A preview link must open on data* and of *A red seed check*, renamed *A red load check* — grep the branch and no skill, script or doc answers either anchor. Both were left narrating the seeding system the branch removes, and the first asserted a data rule unconditionally, which is false in the four repos that declare no `fixture` block. Both are folded into *A preview loads a fixture committed in the diff*, the one anchor five files still cite. Nothing is lost: SahajCloud#874 (an empty preview that passed every check), SahajCloud#1073 (a disclosure line that read as compliance), the 13-of-40 count and the red `/api/health` load check all survive as that section's evidence. The conditional now sits in its closing paragraph, where the block that gates it is defined. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Mg9rjYWpRJKcQmqexwihde
|
Addressed the adversarial review on 16a651e.
Lean gate green. 470/470 across lib and dispatcher. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
fixtureblock, the loop cites or adds fixture records for each surface a diff changes, and builds Preview links from their ids without ever opening the preview.PREVIEW_ACCESS_*credentials are all removed.Change outline
Contract — a repo's
.claude/workflow.jsonA new optional block, read by config and never by repo name. A repo without it keeps plain links and no data rule.
Flow — finalize-pr step 7, Every link opens on data
Behaviour — review-pr
Files
Rule delta
node workflow/lib/rule-delta.mjs --base origin/main workflow/skills— 93 → 92 directives, oneadded and two removed. Each removal, adjudicated:
Never seed real people's contact details, and never quote data the preview already held—dropped on purpose. Nothing seeds a preview any more, so the second half has no subject. The
first half is restated where fixture data is now written, in
finalize-prstep 7 item 2:Fixture data is made up: never copy a real person's contact details into it.
Never name a fixture you have not checked.— dropped on purpose, superseded. The addeddirective
Never cite an id you have not read in a file on the branch.is the stronger formof it, and
finalize-prstep 7 item 5 keeps thegit ls-filesrequirement for a path the bodynames.
Never print the token— this one fell out, and is restored infix-ci/SKILL.md:59, theone step that still reads a log with a bearer token. It was deleted with the preview credential
it used to guard.
Test results
node --test workflow/lib/*.test.mjs dispatcher/test/*.test.mjs: 470 passed, 0 failed. Re-run afterorigin/mainwas merged in.claude plugin validate ./workflow --strict: passed.docs/why.md#anchor cited anywhere in the repo resolves to a heading, and every in-file(#…)link inwhy.mddoes too.git grep -nE "not seeded|previewUrl\.(seed|auth)|seedsPreviews|PREVIEW_ACCESS|previewAccess"finds one line, the retirement line indocs/routine-setup.md:464.src/components/admin/, which is insurfacePaths. So the rule asks for fixture ids for Imports, Clients (Install tab), Events (the Registrations and Verification tabs) and User Submissions, and refusesNo preview surface.Manual verification
https://pr-<n>.cloud-preview.sydevelopers.com/admin/collections/<slug>/<id>, each citing a fixture id, and no "Data:" line.Notes for reviewer
fixtureblock to SahajCloud's.claude/workflow.json, and pointspreviewUrl.patternat the fixed address.claude-loopCloudflare Access service token.docs/routine-setup.mdnow says it is retired.preview-host.mjsso the name no longer suggests credentials. It now also acceptsfixture.link's host.why.mdsectiona-preview-loads-a-fixture-committed-in-the-diff. That section adds one claim the ticket does not make: a fixture id is never reused.a-preview-link-must-open-on-dataanda-red-seed-check-outranks-a-line-in-the-body. The rewrite left both cited by nothing, and both still narrating the seeding system this PR removes. Their evidence — SahajCloud#874, SahajCloud#1073, the 13-of-40 count and the red/api/healthload check — is folded intoa-preview-loads-a-fixture-committed-in-the-diff, which five files cite.docs/routine-setup.md:290still describes CI's ownCF_ACCESS_*token, which belongs togithub-ci, not the loop.Closes #258
🤖 Generated with Claude Code