Skip to content

feat(loop): link preview fixture records, and drop preview sign-in - #265

Merged
Ardnived merged 12 commits into
mainfrom
claude/feat-258-fixture-offline
Nov 17, 2026
Merged

Ardnived merged 12 commits into
mainfrom
claude/feat-258-fixture-offline

Conversation

@Ardnived

@Ardnived Ardnived commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • In a repo that declares a fixture block, 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 sign-in, seeding, the step-7b deploy wait, the "Data: not seeded" disclosure and the PREVIEW_ACCESS_* credentials are all removed.

Change outline

Contract — a repo's .claude/workflow.json

A new optional block, read by config and never by repo name. A repo without it keeps plain links and no data rule.

 previewUrl
-  seed, auth                                   # removed: nothing seeds or signs in any more
+fixture
+  path          "src/fixture/"                 # one file per collection, explicit numeric ids
+  link          "https://pr-{pr}.…/admin/collections/{collection}/{id}"
+  surfacePaths  [ … ]                           # a diff touching none may write "No preview surface"

Flow — finalize-pr step 7, Every link opens on data

 step 7  Preview
-  sign in to the preview (PREVIEW_ACCESS_*, previewUrl.auth), seed it (previewUrl.seed)
-  7b: wait for the deploy, then verify each link opens on data
-  or write "Data: not seeded yet"
+  with a fixture block:
+    list the surfaces in fixture.surfacePaths the branch diff touches
+    per surface: cite fixture entries on the branch, or add one in this PR
+    link = fixture.link filled with {pr, collection, id}; say what each record shows
+    no surface touched → "No preview surface" allowed
+  without one: plain links, no data rule
 step 8  push and end                           # no wait of any kind

Behaviour — review-pr

 Preview links
-  open each link with Access headers and sign in, to judge whether it shows data
+  each id cited exists under fixture.path on the branch, and the entry shows what the line claims
+  should-fix: a surface diff with no cited id · a cited id absent from the branch · `No preview surface` on a surface diff
   should-fix: a link not on fixture.link's or previewUrl.pattern's host   # kept

Files

- workflow/lib/preview-auth.mjs (+ test)   accessPlan, authPlan, seedsPreviews, seed
+ workflow/lib/preview-host.mjs (+ test)   previewHost, onHost, --on-host, VERDICTS, + fixtureHost
  loop-config.json                         previewAccess block, preview.deployWaitMinutes / pollSeconds removed
  format-ticket, write-ticket, implement-ticket   a checklist line naming the fixture data a change needs
  fix-ci                                   carries the spelled-out never-print-the-token rule
  docs/why.md                              the 7b exception replaced; three preview sections folded into one
  docs/routine-setup.md                    the PREVIEW_ACCESS_* setup replaced by one retirement line

Rule delta

node workflow/lib/rule-delta.mjs --base origin/main workflow/skills — 93 → 92 directives, one
added 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-pr step 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 added
    directive Never cite an id you have not read in a file on the branch. is the stronger form
    of it, and finalize-pr step 7 item 5 keeps the git ls-files requirement for a path the body
    names.
  • Never print the token — this one fell out, and is restored in fix-ci/SKILL.md:59, the
    one 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 after origin/main was merged in.
  • claude plugin validate ./workflow --strict: passed.
  • Every docs/why.md# anchor cited anywhere in the repo resolves to a heading, and every in-file (#…) link in why.md does too.
  • git grep -nE "not seeded|previewUrl\.(seed|auth)|seedsPreviews|PREVIEW_ACCESS|previewAccess" finds one line, the retirement line in docs/routine-setup.md:464.
  • Dry run against SahajCloud#1155's diff, done by reading it: every changed file is under src/components/admin/, which is in surfacePaths. So the rule asks for fixture ids for Imports, Clients (Install tab), Events (the Registrations and Verification tabs) and User Submissions, and refuses No preview surface.

Manual verification

  1. After SahajCloud#1181 merges, the next SahajCloud PR the loop opens has Preview links of the form https://pr-<n>.cloud-preview.sydevelopers.com/admin/collections/<slug>/<id>, each citing a fixture id, and no "Data:" line.

Notes for reviewer

  • Merge order: feat(preview): load a typed fixture at boot that covers every surface SahajCloud#1181 first, then this. That PR adds the fixture and the fixture block to SahajCloud's .claude/workflow.json, and points previewUrl.pattern at the fixed address.
  • After this merges, a person switches off the claude-loop Cloudflare Access service token. docs/routine-setup.md now says it is retired.
  • Kept, though the ticket listed it for deletion: the host check behind review-pr's off-host finding, renamed preview-host.mjs so the name no longer suggests credentials. It now also accepts fixture.link's host.
  • The wording to check: the new Every link opens on data, and the why.md section a-preview-loads-a-fixture-committed-in-the-diff. That section adds one claim the ticket does not make: a fixture id is never reused.
  • Two anchors are gone, not renamed: a-preview-link-must-open-on-data and a-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/health load check — is folded into a-preview-loads-a-fixture-committed-in-the-diff, which five files cite.
  • Left alone: docs/routine-setup.md:290 still describes CI's own CF_ACCESS_* token, which belongs to github-ci, not the loop.

Closes #258

🤖 Generated with Claude Code

Ardnived and others added 8 commits November 16, 2026 16:03
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
@sydevs-bot

sydevs-bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

🤖 no session running

recent dispatches
  • 00:40Z address-review · attempt 1 · session · done
  • 00:40Z address-review · attempt 1 · session
  • 00:33Z review-pr · attempt 1 · session · done
  • 00:33Z review-pr · attempt 1 · session

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 17, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 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 no rule-delta.mjs adjudication, 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 while fix-ci still 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

Comment thread docs/why.md Resolved
Comment thread workflow/skills/finalize-pr/SKILL.md Resolved
Comment thread workflow/skills/review-pr/SKILL.md Resolved
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 17, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 17, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 17, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 17, 2026
sydevs-bot and others added 4 commits November 17, 2026 00:41
`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
@sydevs-bot

Copy link
Copy Markdown
Contributor

Addressed the adversarial review on 16a651e. origin/main merged in clean, pushed with the work.

  • Adopted — why.md:362: both orphaned sections folded into A preview loads a fixture committed in the diff, the one anchor five files cite. 897abf1
  • Adopted — finalize-pr:291: Never print the token restored in full at fix-ci/SKILL.md:59, the one step still reading a log with a bearer token. 91e7f42
  • Adopted — review-pr:93: fixture.path named as a directory to list, and the dropped check on body-named inputs restored. 00f5e2c
  • Adopted — review body, "the body carries no rule-delta.mjs adjudication": added as Rule delta. 93 → 92 directives, and the two remaining removals are named deliberate beside what replaced each.

Lean gate green. 470/470 across lib and dispatcher.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 17, 2026
@sydevs-bot sydevs-bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 17, 2026
@Ardnived
Ardnived merged commit c3eafd1 into main Nov 17, 2026
44 of 48 checks passed
@Ardnived
Ardnived deleted the claude/feat-258-fixture-offline branch November 17, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

feat(loop): link preview fixture records, and drop preview sign-in

2 participants