From e8dd32685675ea23fa5686c269995cf6047f1468 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 18 Oct 2026 09:22:26 +0000 Subject: [PATCH] docs(spec): the form.sharing and formViews liveness rows quote the code as it reads now The two rows' evidence quoted code that no longer exists on main (`slugMatchesPublicLink(...)` and `const formViews = view.formViews`). They now cite findPublicFormView in packages/rest/src/form-routes.ts and anonymousFormIntakeCandidates / anonymousFormIntakeSlug in packages/spec/src/ui/anonymous-form-intake.ts, quoting only text those files carry. The sharing row names all three keys the slug rule reads. Verdicts, notes and every other row are unchanged. Claude-Session: https://claude.ai/code/session_019oFY6Hi35J7atvgVFnmoaK Co-authored-by: Claude --- .changeset/24063-view-liveness-evidence.md | 11 +++++++++++ packages/spec/liveness/view.json | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .changeset/24063-view-liveness-evidence.md diff --git a/.changeset/24063-view-liveness-evidence.md b/.changeset/24063-view-liveness-evidence.md new file mode 100644 index 00000000000..cfaa38bbd66 --- /dev/null +++ b/.changeset/24063-view-liveness-evidence.md @@ -0,0 +1,11 @@ +--- +'@objectstack/spec': patch +--- + +The liveness ledger's `form.sharing` and `formViews` rows quote the code that reads their keys as it now reads + +Clause-②: no (only the two rows' evidence text changes and both statuses stay `live`: `ViewSchema` accepts `form.sharing` and `formViews` exactly as before, and no state count moves) + +- `liveness/view.json`, row `form.sharing`: the evidence quoted a `slugMatchesPublicLink(sharing.publicLink, slug)` call that no longer exists. It now cites `packages/rest/src/form-routes.ts#findPublicFormView`, which loops over `anonymousFormIntakeCandidates(view)`, and the two rules in `packages/spec/src/ui/anonymous-form-intake.ts` it reads: `anonymousFormIntakeCandidates`, which hands each form's `sharing` to the slug rule, and `anonymousFormIntakeSlug`, which reads all three keys (`enabled`, `allowAnonymous` and `publicLink`). The `resolveFormBySlug` clause now says where `publicFormGrant` is set: in the submit door, for the match that `resolveFormBySlug` returns. +- `liveness/view.json`, row `formViews`: the evidence quoted `const formViews = view.formViews`, which no longer exists. It now quotes the line of `anonymousFormIntakeCandidates` that makes every `formViews` entry a candidate. +- The verdicts, the notes and every other row are unchanged. diff --git a/packages/spec/liveness/view.json b/packages/spec/liveness/view.json index 572af595f1e..60737e436b9 100644 --- a/packages/spec/liveness/view.json +++ b/packages/spec/liveness/view.json @@ -353,7 +353,7 @@ "sharing": { "status": "live", "verifiedAt": "2026-08-28", - "evidence": "packages/rest/src/form-routes.ts#findPublicFormView (`slugMatchesPublicLink(sharing.publicLink, slug)` — scanned across `form` and every `formViews` entry); packages/rest/src/form-routes.ts#resolveFormBySlug (grants `publicFormGrant` for the matched form's object)", + "evidence": "packages/rest/src/form-routes.ts#findPublicFormView (`for (const c of anonymousFormIntakeCandidates(view))` then `if (c.slug !== slug) continue;` — the public form doors serve only a candidate whose slug matches); packages/spec/src/ui/anonymous-form-intake.ts#anonymousFormIntakeCandidates (hands each form's `sharing` to `anonymousFormIntakeSlug`, across the nested `form`, every `formViews` entry and the flattened `config` of a `viewKind: 'form'` item); packages/spec/src/ui/anonymous-form-intake.ts#anonymousFormIntakeSlug (the slug rule reads all three keys: `if (s.enabled !== true) return null;`, `if (s.allowAnonymous !== true) return null;`, `if (typeof s.publicLink !== 'string' || !s.publicLink) return null;`); packages/rest/src/form-routes.ts#resolveFormBySlug (both doors resolve the match through it, and the submit door grants `publicFormGrant: { object: match.object }` for the matched form's object)", "note": "Framework-side consumer: public (anonymous) form endpoints opt in via FormView.sharing — /forms/:slug resolves sharing.publicLink across form + formViews (rest-server.ts:1716, :4366-4405) and grants publicFormGrant. Renderer-side the config is not read (audit L20) — the public form is served, not re-parsed client-side. 2026-08-28: RE-ANCHORED (commit 8f10a79f7) and REPOINTED — `:4384` had rotted onto a comment about `api`-only route enumeration, ~4,020 lines above the form endpoints; the note's own inline pointers (`:1716`, `:4366-4405`) had gone with it and are superseded by the anchors. Re-closed by hand against 8cb96ec41." }, "submitBehavior": { @@ -389,7 +389,7 @@ "formViews": { "status": "live", "verifiedAt": "2026-08-28", - "evidence": "packages/spec/src/ui/anonymous-form-intake.ts#anonymousFormIntakeCandidates (`const formViews = view.formViews` — every named form view is a public-link candidate); packages/spec/src/ui/view.zod.ts#expandViewContainerWithDiagnostics (flattens them into independent ViewItems)", + "evidence": "packages/spec/src/ui/anonymous-form-intake.ts#anonymousFormIntakeCandidates (`for (const [key, fv] of Object.entries(v.formViews)) forms.push({ form: fv, key });` — every named form view is a public-link candidate); packages/spec/src/ui/view.zod.ts#expandViewContainerWithDiagnostics (flattens them into independent ViewItems)", "note": "Named form views. Framework: public-form slug resolution scans form + every formViews entry (rest-server.ts:4384-4405); expandViewContainer flattens them. objectui: MetadataProvider routes viewKind:'form' items into objectDef.formViews (never into the list switcher). Same inner shape as `form`; per-key classification lives under form.children. 2026-08-28: RE-ANCHORED (commit 8f10a79f7) and REPOINTED — `:4384` had rotted onto the same `api`-only comment its sibling `form.sharing` cited; the note's `rest-server.ts:4384-4405` range went with it. Re-closed by hand against 8cb96ec41." } }