Skip to content

feat(pages): place pages in each service by its configuration - #1243

Open
sydevs-bot wants to merge 45 commits into
mainfrom
claude/feat-783-public-channels
Open

sydevs-bot wants to merge 45 commits into
mainfrom
claude/feat-783-public-channels

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A page belongs to the website or the app because that service's configuration names or tags it — no per-page publish switch.
  • A website key reads only the pages wm-web-config places; an app key those wm-app-config places plus the website's, which it opens in its in-app browser.
  • The fixture seeds both configurations, so a preview shows pages each service places — a configuration is the one thing that places a page, and the fixture wrote collections only.
  • Joined: the cache plugin's global purge returns early on a fixture write, as both of its collection halves already do.
  • Every wm-app-config page slot is required, liveMeditationsReminderPage included (reviewer, 2026-11-25), so fix(app-status): report a configured page that is trashed or unset #1255's report keeps one rule for all fifteen.
  • The page's availability is a compact, colour-coded table, a row per service (reviewer, 2026-11-25), built on the StackedTable the Install tab's progress uses.

Change outline

Flow — a client's page read clause

A client's pages read gains one narrowing beside the published-only clause; every other collection and caller gets byte-identical clauses to main.

 createAccessConfig(collection, 'read')                src/plugins/access/accessConfigs.ts
   caller is a client, not live preview
-    entityHasDrafts → return { _status: published }
+    clauses = []
+    entityHasDrafts → push { _status: published }
+    servicePagesClause(req, collection)               src/plugins/access/servicePages.ts
+      not pages, or not a client                     → null
+      getProjectsFromRoles(user.roles) → PAGE_SERVICES_BY_PROJECT
+        wemeditate-web → [web] · wemeditate-app → [app, web]   # the app opens web pages by webUrl
+        no page project                              → null
+      servicePagesWhere(every service's loadServicePages(req, service))   src/lib/pageServices/index.ts
+        { or: [ { id: in <ids the page fields name> }, { tags: in <Page tags> } ] }
+        two services → one id list and one tag list, not a clause each
+        nothing configured                           → { id: { exists: false } }   # fails closed
+    one clause → return it · two → { and: clauses } · none → fall through, as before

Behaviour — what places a page in a service

loadServicePages reads the configuration once per request, off its own connection, and walks the global's built flattenedFields, so a page field added to either configuration places its pages with no other change.

loadServicePages(req, service)                          src/lib/pageServices/index.ts
  memoizeOnRequest('pageServices:<service>')
    findGlobal(slug, depth 0, overrideAccess)           # req not forwarded: no write transaction joined
    servicePagesFromConfig(flattenedFields, data)
      relationship → pages      → ids += page id
      group · tab · array · blocks → descend
      pageTags                  → tags
isPagePlaced(page, pages)  → the service names its id, or lists a tag it carries
pagePlacement(page, pages) → which of the two, for the sidebar table to name

Contract — the configuration globals and the page

 wm-web-config                                          src/globals/WeMeditateWebConfig/
   homePage · featuredPages · featuredArticles · classPages · knowledgePages · infoPages
   indexPages      meditations · lectures               # on `main` since #1254, and it places too
+  pageTags        select hasMany (all page tags)       # every page field above places its pages too
 wm-app-config                                          src/globals/WeMeditateAppConfig/
   Pages tab: the 14 slots
+  liveMeditationsReminderPage   required slot       # the page the app named by slug alone
+  pageTags        select hasMany
 pages.tags                                             src/lib/pageTags/
   wisdom · lifestyle · creativity · event · technique  # FACET_PAGE_TAGS, the content index's filters
+  subtle-system                                        # the one tag with no facet label
 pages (virtual)                                        src/collections/Pages/
   webPath · webUrl   published, and
+                     placed on the website
   appUrl             published, and
-                     named by an app slot
+                     placed in the app (slot or Page tag)
+  availability       a `ui` field: the sidebar table, no column of its own
+                     Service  | Status
+                     Website  | Available      (note: tagged "wisdom")
+                     App      | Not published  (note: named in its configuration)
+                     a row not placed reads "Not placed", and one line below the
+                     table names the configuration to place it in

Contract — what a client's read answers

 GET /api/pages                       website key
-  every published page
+  every published page wm-web-config names or tags
 GET /api/pages                       app key
-  every published page
+  every published page wm-app-config names or tags, and the website's
+                                     # an app page carries appUrl; a website one only webUrl
 GET /api/pages/<id>                  a page outside the caller's set
-  200
+  404
 a populate reaching such a page      menus, app cards, content-index fetches
-  the document
+  its bare id                        # what partitionPublishedPages already discards
 manager · overrideAccess · live preview
   unchanged

Behaviour — cache

A page's place moves when a configuration is saved, with no page row written, so either configuration's save also purges the pages tag.

 cachePlugin global afterChange                          src/plugins/cache/index.ts
-  purge [slug]
+  req.context.fixture                                   → purge nothing
+  purge [slug, ...GLOBAL_DEPENDENT_TAGS[slug]]          # wm-web-config, wm-app-config → pages

Behaviour — the preview fixture

A configuration is the one thing that places a page, so a preview with both empty shows a table
refusing every page and a null webUrl on all of them. The fixture now writes globals too.

 src/fixture/                                            src/fixture/
   fixture('<collection>', [...])  → FIXTURES
+  globalFixture('<global>', {...}) → GLOBAL_FIXTURES    # wm-web-config, wm-app-config
+    hashed at `fixture:global:<slug>`, written after every collection
+    never pruned: a global always exists
+  wm-web-config  pageTags ['wisdom']        · 6 page fields named
+  wm-app-config  pageTags ['subtle-system'] · 14 slots + the reminder slot

Preview

Both configurations arrive filled, so every link above shows a real answer and both keys read pages.

Contract impact

src/payload-types.ts gains pageTags on both configurations, liveMeditationsReminderPage on wm-app-config, and subtle-system in Page['tags']; the page gains no column — where it is available is a sidebar table, and webUrl/appUrl are what a consumer reads the answer from; WeMeditateWeb and SahajAtlasWeb re-sync it through contractSync.

  • ⚠ WeMeditateWeb's sync needs one line: PAGE_TAG_KEYS (lib/content-blocks.ts) is satisfies Record<PageTag, TranslationKey>, and subtle-system carries no facet label, so it is excluded there rather than labelled.
  • The released app's key is narrowed too. Checked against production (2026-11-22): every page it fetches is a wm-app-config slot (64, 65, 73, 74, 76, 77, 78, and 5 by slug), a technique page listed in page 74, a subtle-system node page, or an app-card destination — all of which (5, 64, 65, 78, 95) are slots. App keys 2 and 5 hold wemeditate-app-client alone. sydevs/WeMeditateApp#453 reads every id from the configuration, and opens a page without appUrl at its webUrl.
  • The released app reads webUrl on its config pages and app-card pages. It is now null for a page the website does not place, as it already was for an unpublished one. The app routes every app-only page it knows natively by slug (routeForPageSlug), and a card with no route and no webUrl shows "not available" instead of opening a page that 404s on the new site.

Migration

  • New migrations: src/migrations/20261122_213242_add_service_page_tags.ts (generated), src/migrations/20261122_213300_place_service_pages.ts (data only), src/migrations/20261123_001950_add_app_live_reminder_page.ts (generated), src/migrations/20261123_002000_fill_app_live_reminder_page.ts (data only), src/migrations/20261125_191100_require_app_live_reminder_page.ts (generated, with the fill repeated above its SET NOT NULL) and src/migrations/20261125_192705_merge_snapshot_heal.ts (no DDL)
  • Impact: two sub-tables, wm_web_config_page_tags and wm_app_config_page_tags, and subtle-system added to the pages and _pages_v tag enums. The data migration seeds the website's Page tags (every facet tag plus subtle-system) and the app's (technique, subtle-system), leaving a configuration that already lists tags alone, and tags each subtle-system node's page subtle-system on its main and latest version rows. The reminder slot is a column with its foreign key and index, filled with the live-meditations-reminder page where the slot is empty and then made NOT NULL, as the other fourteen slots already are. Production page 96 carries that slug, read 2026-11-25; a database holding no such page and a configuration row would abort the boot migration, so the fill runs again in the same migration
  • The snapshot heal carries no statement at all. main's 20261123_185218_pages_parent_index_pages has a timestamp between this branch's own, so the newest snapshot on disk described a schema holding none of its columns, and the next migrate:create re-emitted all twelve — statements that abort the boot migration on a database that already ran them (feat(regions): country slug = ISO alpha-2 code #566). Its .json was generated on the merged tree, and a second probe writes no files
  • Reversible: yes. The data migration's down removes every Page tag and every subtle-system tag, whoever set them; the schema migration's down deletes surviving subtle-system tags before narrowing the enums back; the reminder slot's down drops the NOT NULL
  • The previous revision's three migrations (two columns, their backfill, a snapshot heal) are gone. The preview already ran them, so its database keeps two unused columns; nothing reads them, and production never saw them

Test results

  • Lean gate: ✓ .claude/skills/pr-prep/check.sh — lint, format, typecheck, test-suite typecheck, unit lane — on this round and each one before it
  • Targeted specs: ✓ 64 passed across fixture-load, pages, service-pages, globals-client-reads and pages-localize-status on this round; before it, ✓ 93 across pages, service-pages, wm-app-config, pages-localize-status, globals-client-reads and content-index-block, and earlier ✓ 199 across those plus role-based-access and wemeditateAppStatus, and ✓ 287 across eight other client specs that read pages
  • Watched fail first: fixture-load's new placement case, run with the globals unseeded, and the cache plugin's fixture case against the missing guard
  • Contract step: ✓ pnpm db:migrations:create probe --skip-empty writes no files on the merged tree, this round included
  • Migrations measured on throwaway databases: the whole chain up, then down with a subtle-system-tagged page present; the placement migration up, up again and down against configured globals, three node rows (one page named twice), and a latest and a non-latest version row; the reminder fill up and down
  • Merge round (main merged in at 8d45a5a): ✓ lean gate; ✓ 78 passed across wm-app-config, wemeditateAppStatus, pages, service-pages and globals-client-reads
  • Required-slot round (main merged in at ff99b51): ✓ lean gate; ✓ 64 passed across wm-app-config, wemeditateAppStatus, available-locales, fixture-load and service-pages. The config spec's "every page relationship is required" assertion was watched fail against the optional slot. The new migration measured on a throwaway database: the whole chain up, then a row holding NULL filled from the slug and enforced, the same run again after a DROP NOT NULL, and refused where no page carries the slug
  • Availability-table round (main merged in at 30baae4, five conflicts): ✓ lean gate, 3,944 unit specs passing; ✓ 23 in pages-nesting, ✓ 76 across pages, content-index-block and pages-localize-status, and ✓ 22 across service-pages and globals-client-reads. Watched fail first: pages-nesting's three address and client-read cases, which the merge broke until the suite placed its pages, and the table's amber case against a flattened tone. ✓ the contract probe writes no files once the snapshot heal is in
  • Build: N/A — Railway builds it on the preview

Manual verification

  1. On the preview, as a manager, open page 1014004 and read its sidebar table; then take wisdom out of We Meditate Web › Configuration's Page tags, save, and the Website row reads "Not placed".
  2. With the website key (client 1022005) and DisableAutologin: true, GET /api/pages?depth=0&limit=100&select[slug]=true lists only wisdom-tagged and configuration-named pages, and GET /api/pages/<an untagged page> answers 404. The app key (1022004) lists the same pages, plus any its own configuration places.
  3. Done in production, 2026-11-22 (attended, approved): the 20 published pages no configuration field or tag placed now carry an existing tag — 14 artist and poetry features creativity; what-is-meditation, history-of-meditation, meditation-experiences and the Shri Mataji articles 40 and 43 wisdom; meditate-america event — on the live row and its latest version row. The empty stubs mooladhara (80) and sushumna (90) are unpublished and in the trash; page 70 ("Hand massage with oil") is now at hand-massage-with-oil; app-privacy-policy (17) is left as it is, and leaves the website with this deploy.

Notes for reviewer

  • Merges before feat(server): switch wemeditate.com over to the new site WeMeditateWeb#280, as before. sydevs/WeMeditateApp#453 is the app's half.
  • The app reads the website's pages by design (owner, 2026-11-22): a card or link to a page the app does not carry opens in the in-app browser at its webUrl. A page in neither service is hidden from both.
  • Both earlier question threads are settled by the reshape. "Should unticking a channel be refused?" has no checkbox left to untick: a page a configuration names is placed by definition. "Should webUrl go null?" was answered B, and is built.
  • The data migration is a backfill inside a migration, which src/migrations/AGENTS.md asks to surface: without it the website key would read only configuration-named pages from the deploy until someone typed the tags in. It writes no ids measured on one database — both tag lists are decisions, and the node pages are read from subtle_system_nodes.
  • ⚠ Page 6 (sahajaYogaPage, unpublished today) is embedded by the app at wemeditate.com/sahaja-yoga?embed=1, so it must be named or tagged for the website when it is published.
  • src/lib/pageServices stays, narrowed: the table reads it, and so does the client read clause, which is a Where and has no component to compute it.
  • The fixture's globals are a reviewer surface, not a seed. They are reconciled by hash like a row, so a reviewer's own edit to either configuration survives until the entry changes — which is what makes step 1 of Manual verification worth doing on the preview.
  • Dismissed review findings:
    • A select narrowing the configuration read to its page fields: it runs once per request, and the walk is what defines the fields.
    • Tagging page reads with the configuration slugs instead of purging pages from the writer: the writer side also covers custom endpoints tagged pages, and a spec pins that every placing configuration purges it.
    • Other cached reads that populate pages stay stale until their TTL after a configuration save, like any populated relationship today.
    • The read ignores the request locale: no page field or tag list on either configuration is localized.
Detail

Why the reshape. The two "Published to" checkboxes put a second publish control beside Publish, and nothing kept them in step with the configurations that already decide which pages each service shows. The installed app also reaches pages the checkbox backfill never covered: the Techniques screen fetches five technique pages (67, 69, 70, 71, 97) it finds in page 74's text, none named by wm-app-config, so the app filter would have 404'd them in builds that cannot be updated.

Why upstream, still. Three of the website's reads take a where it could extend; findByID, a populated relationship and the content-index block's own fetch do not. One read clause here covers them all.

Why subtle-system is a tag rather than a rule on the node collection. The owner chose the tag (2026-11-22), so every page is placed through a configuration. The content index does not offer it as a filter, and it has no facet label.

Why the app key reads the website's pages. A page the app reaches but does not carry — an app card or a link to a website page — must still resolve to an address, or the released app shows it as unavailable. Row access cannot hand out an address without the row, so the app's set is its own plus the website's, and appUrl marks which pages are the app's own.

The sidebar table is a server ui field component, so it renders on the edit view alone — a list, a populate, a client read and a job's read compute nothing. It reads the page under the caller's own access before anything else, which is the read gate every server field component owes (#1126), and reports the published row, the one a service serves.

Review passes run. /simplify (four cleanup agents), /code-review high, /security-review (triggered by src/plugins/access/, nothing at its reporting bar), and the deterministic comment lint (no banned comment). No pr-review-toolkit plugin is installed here. The review round ran /security-review again over its own commits — the new server field component's read gate, and whether the flattened read clause matches a wider set than the per-service one it replaced — and the comment lint; neither reported anything. This round ran it once more over the merge, the snapshot heal and the table, asking whether the restructure moved the component's read gate, whether anything from the page row crosses into the new client component, and whether the merge widened a client key's read; it reported nothing, and named every path it read. The comment lint found no banned comment.

Closes #783

🤖 Generated with Claude Code

https://claude.ai/code/session_01Mg9rjWUDqgxsj1zo6Ki8KF

Two indexed, non-localized checkboxes on a page — `publishedToWeb` and
`publishedToApp` — and one read clause beside the published-only one, keyed
on the calling client's own roles. A page an editor has not published to a
service is not readable by that service at all.

The clause lives in SahajCloud rather than in WeMeditateWeb because this is
the only place that reaches every surface a page arrives through: a `find`, a
`findByID` that carries no `where`, a populated relationship and the
content-index block's own fetch. It is also the only mechanism that can hide
a page from an installed app release, which ships compiled.

The backfill resolves the app's read set in SQL rather than from a list of
ids: the fourteen `wm_app_config` slots, every `subtle-system-nodes.page` and
every `app-cards` page destination. All twelve node pages sit outside those
fourteen, so a backfill derived from them alone would have marked every
chakra and channel page Web-only and cost the installed app its node detail
pages. It mirrors onto the `latest` version rows too, or the first publish
after deploy writes the column defaults back over it. Measured against a
throwaway database: the five probe rows land as specified, the non-latest
version row is untouched, and `migrate:down` restores the defaults.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVMZiqCKCp8MmGnw2L
The role-to-column matrix lives in the unit spec, which needs no database.
The integration spec covers what does: each read shape the clause has to
reach (a find, a findByID 404, a populate that degrades to a bare id on the
app's own `wm-app-config` read), that it is ANDed with the per-locale
published-only clause rather than replacing it, and that a manager and live
preview are untouched.

Every assertion but one was watched fail against a defect: the clause
removed, `or` turned into `and`, the published clause dropped, and the
client gate removed so the narrowing leaks to managers. The `overrideAccess`
case cannot fail — Payload skips access control there — and says so.

`pages.int.spec.ts`'s app-client case now publishes its page to the app:
without that it read a page the app does not publish.

`role-based-access.int.spec.ts` pins the invariant the clause exists for —
`pages` sits in both services' projects, so implicit read alone hands every
page to both.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVMZiqCKCp8MmGnw2L
…scribes it

`docs/rules/access.md` carries the rule, beside the project-based implicit
read it narrows. `docs/rules/api-clients.md` carries what a consumer
observes: fewer documents from a find, a 404 from a findByID, a bare id from
a populate, and the rich-text references no `Where` can reach.
`src/collections/AGENTS.md` says why the two columns are not localized, next
to the per-locale `_status` they sit beside.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjVMZiqCKCp8MmGnw2L
The backfill turned Web off for the four slugs the app alone reads but gave
App on only to pages one of the three stored sources names. In production
`wm_app_config`, `subtle_system_nodes` and `app_cards` name none of `path`,
`let-the-app-find-your-city` or `live-meditations-reminder`, so those three
landed Web-off and App-off: readable by no service at all.

The slug list is the only thing that can reach them, because the app routes to
them itself and stores no reference here. App-off in an installed release is
unrecoverable; App-on costs an editor one unticked box, so the asymmetry
decides it.

Measured against a throwaway database carrying all nine cases, after
`pnpm payload migrate` applied the whole chain: an unreferenced page stays
Web-on/App-off, each stored source turns App on, the four app-only slugs land
App-on/Web-off, the `latest` version rows mirror and a non-latest one does not,
and `down` returns every row to the column defaults.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXC4WxUHuaGH3iGdYG
Resolves `src/migrations/index.ts`, and regenerates both of this branch's
migrations on the merged tree.

The snapshot chain forced the regeneration. `main` gained
20261118_235242_wm_web_drop_video_tab, which drops four translations columns,
and 20261119_223756_merge_snapshot_heal, whose whole purpose is to be the first
snapshot describing both branches. This branch's two migrations carried later
timestamps and snapshots generated before either, so the merged tree's newest
snapshot still described the dropped columns — the next migrate:create would
have re-emitted those four DROP COLUMN statements and aborted the boot
migration on a database that already ran them (#566).

So both files move to timestamps after the heal and take a snapshot generated
on the merged tree. The regenerated DDL is byte-identical to the reviewed one,
and nothing else came with it. `migrate:create --skip-empty` now writes no
files, and the whole chain applies to a fresh database.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXC4WxUHuaGH3iGdYG
… client role

`CHANNEL_BY_ROLE` was a third record of a fact `roles.ts` already owns: which
service a role belongs to. Keying on the project instead removes the copy and
closes the fail-open direction it left — implicit read of `pages` is
project-keyed, so a second website or app key would have been granted the
collection and narrowed by nothing, silently reading both services' pages. It
also restores what `docs/rules/access.md` promises about adding a role: the
lookup tables compute, with nothing to update by hand.

`getProjectsFromRoles` already does the role flattening, the project lookup and
the dedupe, so the hand-rolled reduction and its cast go too.

The widening this accepts is the same rule in reverse: any role placed in
`wemeditate-web` or `wemeditate-app` now takes that channel. That is what
implicit read already does with those projects, and the docblock says so. The
unit spec pins it with `web-translator`, a web-project role that is not a client
role, so the case fails if the mapping goes back to naming roles.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXC4WxUHuaGH3iGdYG
…ackfill

The Web-off half of the backfill trusted a slug list measured against one
database on one day. `wm-web-config` requires a `homePage` and names five more
page lists, and a required slot answering `null` 404s the site — so the list
being stale by one slug was a site-wide outage.

It now follows the rule the App half already follows: read the stored sources,
never trust the list. A page carrying an app-only slug keeps Web on if
`wm_web_config` or `wm_web_config_rels` still names it.

Also merges the two App-on id sets into one, so `up` and `down` read as
mirrors, and fixes a breadcrumb that named the schema migration's pre-merge
timestamp.

Measured against a throwaway database with the whole chain applied, nine pages:
the website's required `homePage` and a page in `featuredPages` both keep Web on
and gain App, a page named by neither goes Web-off, each stored app source turns
App on, the `latest` version rows mirror and a non-latest one does not, and
`down` returns every row to the column defaults.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXC4WxUHuaGH3iGdYG
`createClientAuthenticatedRequest` already takes the roles as its third
argument, and `idOnlySelect()` already absorbs the cast an id-only client read
needs. The new spec had rebuilt both by hand, which cost eight `as never`
escapes that silence real type errors on the surrounding `find` arguments.

Also drops the role-to-column matrix from the int lane — it is the unit spec's,
and the invariant this file owns is that implicit read grants `pages` to both
projects — and parameterises `visibleIds` so the cases asserting the clause does
not narrow read the same way as the ones asserting it does.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXC4WxUHuaGH3iGdYG
…opens

The rule was written out five times, and the copies had already drifted — one
listed the live-preview proxy among the surfaces the clause reaches, which is
the one surface it is exempt from. `docs/rules/access.md` keeps the mechanism,
`docs/rules/api-clients.md` only what a consumer observes, the collections guide
only the schema facts, and each code site a pointer.

Records the hazard the feature opens: nothing reconciles a channel with the
places that require the page. The migration excepts both services'
configurations, but an editor's later untick is guarded by nothing, so both
field descriptions now say what to check first.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXC4WxUHuaGH3iGdYG
…column

The security sweep named the one fail-open the project keying leaves, a level
up from the one it closed: a project listing `pages` in its `collections` is
granted implicit read of the collection, so one with no entry in
`CHANNEL_BY_PROJECT` would read every page.

The case derives its own table from `PROJECTS` instead of listing the two, so
adding such a project reds the unit lane rather than shipping an unnarrowed key.
Watched fail by commenting out the app project's column: the structural case
goes red beside the two it stands behind.

Co-authored-by: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjXC4WxUHuaGH3iGdYG
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1243 November 20, 2026 23:52 Destroyed
@railway-app

railway-app Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-1243 environment in sahajcloud

Service Status Web Updated
SahajCloud 😴 Sleeping (View Logs) Web Nov 26, 2026 at 4:33 am UTC
1 service not affected by this PR
  • mailpit

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

2 questions for the reviewer, one per thread.

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


Generated by Claude Code

Comment thread src/collections/Pages/Pages.ts Resolved
Comment thread src/collections/Pages/Pages.ts Resolved
@sydevs-bot

sydevs-bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running
✋ handed back: resolve-conflicts did not finish after 3 attempts
CI fix 1

recent dispatches
  • 22:51Z resolve-conflicts · attempt 3 · session · timed out
  • 22:51Z resolve-conflicts · attempt 3 · session
  • 22:04Z resolve-conflicts · attempt 2 · session · timed out
  • 22:04Z resolve-conflicts · attempt 2 · session
  • 21:14Z resolve-conflicts · attempt 1 · session · timed out

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

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 21, 2026
@sydevs-bot sydevs-bot moved this from Pending to Working in SYDevelopers Technical Roadmap Nov 21, 2026

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

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 the ticket's size, and nothing is smuggled in. The project keying is the right axis — it reuses getProjectsFromRoles and fails closed for a role added later. A refused page arrives as a bare id, which partitionPublishedPages already discards, so the consumer side holds.

One surface the new field invalidates sits outside the diff: the app readiness report still answers on _status alone. The prose is the other overrun — one rule, five homes.

Findings

  • should-fix — src/globals/WeMeditateAppStatus/sections/pages.ts:27. The published check reads _status === 'published', which after this PR is no longer the question for the app. Untick "Published to App" on one of the fourteen slots or a node page and a released build breaks while the report stays green. That section already gathers exactly those ids, so it is one more check beside published. No diff hunk to anchor to, hence here.
  • should-fix — docs/rules/api-clients.md:250, inline. Three doc homes for one rule.
  • consider — src/plugins/access/publicChannels.ts:43, inline. Twelve lines, one caller.

What was checked

Ticket #783 against the diff, criterion by criterion. The restructured read branch and publicChannels.ts whole: the empty-clauses fall-through matches the old non-draft path, and the single-clause return is unchanged for every pre-existing client read. Ladder — getProjectsFromRoles is the existing home, and virtualRoles is manager-only. Both migrations, up and down: the _pages_v latest mirror and the wm_web_config exception hold. The content-index path followed to ContentIndexBlock.ts:64 — a URL the consumer fetches with its own key. All five preview ids resolved against src/fixture/. Both question threads read, and not repeated.

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


Generated by Claude Code

Comment thread docs/rules/api-clients.md Resolved
Comment thread src/plugins/access/publicChannels.ts Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 21, 2026
claude and others added 3 commits November 21, 2026 00:20
The app readiness report asked `_status === 'published'` alone, which after
#783 is no longer the app's question: unticking "Published to App" on one of
the fourteen config slots or a node page hides it from a released build while
the report stayed green. That build cannot be corrected.

`reportForPage` already gathers exactly those ids, so the check sits beside
`published` for both groups. The int spec's new case was watched failing
against the missing check.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZNpz4bPnMwHRC4v1s
The #783 section restated four facts `docs/rules/access.md` states in full —
the bare id, the 404, the `overrideAccess` exemption and live preview — so a
change to the rule had five homes to keep in step. What stays here is what
access.md does not own: that WeMeditateWeb needed no change, the rich-text
gap a consumer can still observe, and which key the app must send (#789).

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjZNpz4bPnMwHRC4v1s
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1243 November 21, 2026 00:27 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Three critic points: two built, one pushed back. origin/main merged cleanly on the way in.

  • Adopted — the app readiness report read _status alone, so unticking "Published to App" on a config slot or a node page left a released build broken and the report green. published-to-app now sits beside published for both groups, watched failing first (43dc1c7). The finding had no thread, so it is answered here.
  • Adopted — the docs duplication: four facts access.md states in full are now one pointer to it (85e72da).
  • Rebutted — folding publicChannels.ts in: three siblings there are 50, 55 and 59 lines against its 54, and the unit spec is a second importer.

The two question threads still wait on you.

🤖 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 21, 2026
@sydevs-bot sydevs-bot moved this from Working to Pending in SYDevelopers Technical Roadmap Nov 21, 2026
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 25, 2026
One conflict, `src/migrations/index.ts`: both branches appended migrations, so
both lists are kept, in timestamp order.

The merge then made this branch's snapshot heal stale. Main's
`20261125_152923_atlas_drop_compact_tab` carries a timestamp below this
branch's own, so the newest snapshot on disk still described the two atlas
`compact` columns, and `migrate:create` re-emitted their `DROP` — statements
that abort the boot migration on a database that already ran them (#566). So
`20261125_192705_merge_snapshot_heal.json` is regenerated on the merged tree
rather than a third heal stacked on top of it; it still carries no DDL.

Nothing else overlapped: main's change is the atlas translations global, and
`src/payload-types.ts` and `src/globals/AGENTS.md` merged on their own.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjYSZvdxzj7AQgUWcHk
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1243 November 25, 2026 19:55 Destroyed
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

🧶 Merged main (0060879) in. One conflict: src/migrations/index.ts, where both branches appended migrations. Both lists are kept, in timestamp order.

The merge then made this branch's snapshot heal stale. Main's 20261125_152923_atlas_drop_compact_tab carries a timestamp below this branch's own, so the newest snapshot on disk still described the two atlas compact columns, and the contract probe re-emitted their DROP — statements that abort the boot migration on a database that already ran them (#566). 20261125_192705_merge_snapshot_heal.json is therefore regenerated on the merged tree, rather than a third heal stacked on it. It still carries no DDL.

Nothing else overlapped: main's change is the atlas translations global, and src/payload-types.ts and src/globals/AGENTS.md merged on their own.

✓ Lean gate, 3,945 unit specs passing. ✓ A second contract probe writes no files on the merged tree.

🤖 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 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 25, 2026
`fixture-load` refused `wm-web-config` with "Home Page [homePage: This field
has the following invalid selections: 1014002, ]". Page 1014002 sits under no
parent and the field narrows to exactly that, so the selection is valid — the
read that checked it was not.

Payload validates a `filterOptions` on the request's own authority and never
threads a global update's `overrideAccess` into it, so the loader's userless
`updateGlobal` read `pages` as anonymous, found nothing, and refused every
value the filter narrows. `homePage` gained that filter on `main` in #1254,
which is why the write only started failing after the merge.

The collection half of the loader already writes as the fixture's admin for the
same class of refusal. The global half now does too.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjWcoGyuc2meoJrSsMM
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-1243 November 25, 2026 20:12 Destroyed
@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 25, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 26, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 26, 2026
One conflict, in `src/migrations/index.ts`: both sides appended to the chain.
Kept both, in timestamp order — this branch's `20261125_192705_merge_snapshot_heal`,
then `main`'s `20261125_213000_atlas_common_copied` and
`20261125_230000_atlas_drop_captcha_blocked`.

Those two of `main`'s are data-only, so each re-stamps the snapshot that preceded
it there — a schema holding none of this branch's columns, and newest by timestamp
once merged. `migrate:create` then re-emitted the page-tag enums and tables and the
reminder-page column, statements that abort the boot migration on a database that
already ran them (#566). `20261126_035953_merge_snapshot_heal` carries that run's
`.json` and no DDL; the probe after it writes no files.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Mg9rjUy5NC46GnkmrLnFw1
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Merged main in at fd8b637. One conflict, in src/migrations/index.ts: both sides appended to the chain, so both are kept in timestamp order.

The merge needed one new file. main's two new migrations are data-only, so each re-stamps the snapshot that preceded it there — a schema holding none of this branch's columns, and newest by timestamp once merged. migrate:create then re-emitted the page-tag enums and tables and the reminder-page column, which abort the boot migration on a database that already ran them (#566). src/migrations/20261126_035953_merge_snapshot_heal.ts carries that run's .json and no DDL — the same heal this branch already took twice. Every re-emitted statement was traced to the migration that ships it.

✓ lean gate, 3,953 unit specs. ✓ 109 across service-pages, globals-client-reads, pages, pages-nesting, translations-globals and translations-english-defaults. ✓ the contract probe writes no files after the heal.

🤖 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 26, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Working to Awaiting in SYDevelopers Technical Roadmap Nov 26, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 26, 2026
@sydevs-dispatcher sydevs-dispatcher Bot moved this from Awaiting to Working in SYDevelopers Technical Roadmap Nov 26, 2026
@sydevs-dispatcher sydevs-dispatcher Bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Nov 26, 2026
@sydevs-dispatcher sydevs-dispatcher Bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Nov 26, 2026
@sydevs-dispatcher

Copy link
Copy Markdown

The session for resolve-conflicts did not finish after 3 attempts. I have stopped retrying. A mention (@sydevs-bot) or a push from you starts me again.

🤖 sydevs dispatcher

This branch was successfully deployed

1 active deployment
sahajcloud / SahajCloud-pr-1243 — f615cd7d Deployed Nov 26, 2026 by railway-app[bot]
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(pages): place pages in each service by its configuration

4 participants