Skip to content

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

Description

@Ardnived

Summary

The loop links SahajCloud previews but cannot tell whether they show the change. It has no credentials to open them, and preview-auth.mjs reports seedsPreviews: false, so a "Data: not seeded" line passes finalize-pr and review-pr. That happened on 13 of the last 40 PRs. Once sydevs/SahajCloud#1168 ships, every preview loads a committed fixture with pinned ids. This ticket makes the loop work entirely offline against that fixture: cite or add fixture records, build links from their ids, and drop the sign-in, seed, wait and disclosure machinery.

Goal context

Second half of sydevs/SahajCloud#1078: this child takes the loop off the preview and makes "the preview shows the change" a property of the diff that review-pr can check.

Approach

A. A generic fixture block in a repo's .claude/workflow.json

"fixture": {
  "path": "src/fixture/",                        // one file per collection, entries with an explicit `id`
  "link": "https://pr-{pr}.cloud-preview.sydevelopers.com/admin/collections/{collection}/{id}",
  "surfacePaths": ["src/collections/", "src/components/admin/", "src/app/(payload)/", "src/plugins/", "src/fixture/"]
}
  • Config-keyed, never repo-named. A repo without the block keeps today's plain Preview links and gets no data rule.
  • Document it in finalize-pr/SKILL.md:37 (the configuration table) and README.md:206.

B. finalize-pr

  • Rewrite Every link opens on data (workflow/skills/finalize-pr/SKILL.md:276-313) for a repo with fixture:
    1. List the surfaces the diff changes.
    2. For each one, cite the fixture entries (<collection> + id) that show it on this branch, or add entries under fixture.path in this PR.
    3. Build each link from fixture.link. Never open the preview.
    4. Say on each link's line what that record shows.
  • A diff touching no surfacePaths may write No preview surface instead of links. A diff touching any of them may not.
  • Delete the seed and sign-in steps, the Data: not seeded yet and Cannot seed branches, and the seedsPreviews bullet (:281-313).
  • Delete step 7b (:335-350) and every reference to it (:384, :411, the hard rule at :405-406). Remove preview.deployWaitMinutes/pollSeconds from loop-config.json:313-315 unless another path still reads them. Check the Cloudflare-discovered previews (:243-262) first; they write "preview pending" without waiting.
  • pr-template.md:33: link wording follows the above.

C. review-pr — workflow/skills/review-pr/SKILL.md:88-105

  • With a fixture block: check that each Preview link's id exists under fixture.path on the branch, and that the entry shows what the link's line claims. A diff touching surfacePaths with no cited id, or with No preview surface, is a should-fix.
  • Stop opening preview links: no Access headers and no sign-in. Keep the off-host finding: a link not built from fixture.link or previewUrl.pattern is a should-fix.

D. implement-ticket and format-ticket

  • format-ticket/SKILL.md (implementation template's ## Verification checklist, and the guidance at :382): where the repo declares fixture, the checklist names the fixture records or states the change needs (e.g. "a Service with the Atlas role and two install milestones").
  • implement-ticket/SKILL.md:110-117: the fixture pre-mortem covers those entries before code is written. Step 10's review aids point at fixture ids, not seeding.
  • write-ticket writes that checklist line when it creates a ticket in such a repo.

E. Delete the credential path

  • workflow/lib/preview-auth.mjs + .test.mjs: remove accessPlan, authPlan, seedsPreviews and seed. Keep the credential-free previewHost/onHost/--on-host only if C still uses them, renaming the file if its name then misleads. workflow/lib/budget.test.mjs:5 imports its VERDICTS.
  • loop-config.json:289-293 previewAccess block.
  • docs/routine-setup.md:451-500: the PREVIEW_ACCESS_* variables, the preview Access token section, and the previewUrl.auth paragraph. Add one line: the claude-loop Access token is retired and is switched off by a person.
  • fix-ci keeps its Railway log reads (workflow/lib/railway.mjs), which need no preview credential.

F. docs/why.md

Rewrite, replacing rather than appending:

  • ## A preview link must open on data (:352)
  • ## A red seed check outranks a line in the body (:375) — the red check is now the app's own load, gated by /api/health.
  • ## A preview link is whatever its poster wrote (:390) — no token is attached any more, but the off-host finding stays.
  • the 7b exception (:933-937).

Add one section on why the loop works offline against a committed fixture: no key, no wait, and data reviewed in the diff. Link sydevs/SahajCloud#1078.

G. Version

Bump workflow/.claude-plugin/plugin.json (now 5.6.0). Merging is the deploy.

Interfaces

Consumes from sydevs/SahajCloud#1168: the fixture layout (src/fixture/<collection-slug>.ts, explicit id ≥ 1,000,000), the admin link shape, and the surface paths. Use those exact values as the documented example. Provides the fixture block's meaning. A person adds the block to SahajCloud's .claude/workflow.json after this merges, and points previewUrl.pattern at the fixed address.

Acceptance criteria

  • finalize-pr on a repo with fixture writes Preview links built from fixture ids, cites or adds entries for every surface in the diff, and never contacts the preview.
  • finalize-pr writes No preview surface only when the diff touches no surfacePaths.
  • No skill, doc or config mentions Data: not seeded, previewUrl.seed, previewUrl.auth, seedsPreviews, PREVIEW_ACCESS_* or previewAccess, except one routine-setup line on retiring the token.
  • review-pr flags, as should-fix, a surface diff with no cited fixture id, a cited id absent from the branch, and an off-host link. It sends no request to a preview.
  • Step 7b and its wait are gone, or reduced to a non-data purpose another path proves it needs.
  • Tickets in a fixture repo carry a Verification checklist line naming the fixture data the change needs.
  • A repo without fixture behaves as today: plain links and no data rule.
  • why.md explains the offline design, and no section still describes the disclosure line or the loop's preview key as current.
  • plugin.json is bumped and node --test passes.

Verification checklist

  • node --test workflow/lib/ dispatcher/test/ passes.
  • git grep -nE "not seeded|previewUrl\.(seed|auth)|seedsPreviews|PREVIEW_ACCESS|previewAccess" returns only the routine-setup retirement line.
  • Read finalize-pr/SKILL.md Every link opens on data cold. Each step names a file-level action, not a network call.
  • Dry-run against SahajCloud#1155's diff by hand: the rule would require fixture ids for Imports, Clients (Install tab), Events (Registrations and Verification tabs) and User Submissions, and builds https://pr-1155.cloud-preview.sydevelopers.com/admin/collections/events/<id> links.
  • jq .version workflow/.claude-plugin/plugin.json is higher than 5.6.0.

Notes

Activity

  1. added theissue type on Nov 16, 2026
  2. moved this from Awaiting to Blocked in SYDevelopers Technical Roadmapon Nov 16, 2026
  3. sydevs-bot commented on Nov 16, 2026

    @sydevs-bot
    Contributor

    🤖 no session running

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

  4. moved this from Blocked to Pending in SYDevelopers Technical Roadmapon Nov 16, 2026
  5. Ardnived commented on Nov 16, 2026

    @Ardnived
    ContributorAuthor

    @sydevs-bot hold until 2026-11-30

    Building this in an attended local session instead. The set build timed out at 22:39Z with nothing pushed.

  6. sydevs-bot commented on Nov 16, 2026

    @sydevs-bot
    Contributor

    Held until 2026-11-30. It comes back to you then. The approval is withdrawn: say @sydevs-bot implement when it should start.

    🤖 sydevs dispatcher

  7. moved this from Pending to Blocked in SYDevelopers Technical Roadmapon Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Priority

    High

    Hold Until

    Nov 30, 2026

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions