- readEnv / legacyEnvName exported from the root and /env (a project's own code reads IAPL_* with the IPAL_* fallback);
the name constants hold the IAPL_ spelling — changelog and env.md say so
- createMcpRoute: the default serverName stays 'ipal-site' (clients see it); the scripted step had changed it
- legacy:site: the builds read the database; the script and PROGRAMISTA say which
Co-Authored-By: Claude Fable 5.2 <[email protected]>
- pnpm legacy:site (scripts/legacy-site-check.mjs): the reference site of v1.16.7, unedited, installed against
this build — old commands, doctor without errors, import map unchanged, tsc, builds with webpack and Turbopack
- test/legacyNameForms.test.ts: the remaining spellings with 'ipal' as a closed list; a new one fails
- found by legacy:site and fixed: 'ipal-tokens --check' called a tokens.css written before 1.17.0 out of date
(its header names the command); the doctor's env-example rule did not accept IPAL_* in .env.example
- the doctor's seed rules catch IPAL_SEED_ALLOW_FULL=1 as before
- PROGRAMISTA: the new release check
Co-Authored-By: Claude Fable 5.2 <[email protected]>
- docs, AGENT.md, the 16 skills, PROGRAMISTA and README use the preferred names (scripted, same list of forms);
past CHANGELOG entries and the proposals in docs/dev are not rewritten
- AGENT.md: 'Names: IAPL and ipal-kit' — old name, new name, state in 1.x; what is not renamed; storageNames
- iapl-upgrade '→ 1.17.0', PROGRAMISTA §6 item 72, CHANGELOG 1.17.0 (draft): nothing required
- env.md, doctor.md (legacy-names, storage-names), stats.md, security.md, project-starter.md, iapl-reference, iapl-setup
- skill scripts read ipal-audit-skip and IPAL_IP_HEADER too; audit rule ids stay what they were
- reference site: iapl(), iapl-doctor.json, iapl-* skills, storageNames: 'iapl'; INDEX.md regenerated
Co-Authored-By: Claude Fable 5.2 <[email protected]>
- exports: ipalKit, IpalOptions, ipalEnvRules, IpalEnvFeatures, ipalT, ipalVar, IPAL_TOKENS,
IPAL_BREAKPOINTS, IpalTokenName, IpalGlobalSlug are aliases of the iapl names
- env: IAPL_* is read first, IPAL_* as fallback (readEnv; EnvRule.aliases for assertEnv);
the crawler service reads IPAL_CRAWLER_SITES too
- doctor: reads ipal-doctor.json when it is the only one, the old pointer block, ipal-audit-skip
and old skill folders; new rule legacy-names (info) and storage-names (warning)
- iapl-skills: installs iapl-*, removes the 16 old folders by exact name, rewrites the old
pointer block in place; a project's own ipal-* skill stays
- storageNames: 'ipal' (default) | 'iapl': the cookie the scanner declares and the 2FA counter's
kv prefix; <PageStats visitorCookie>, IAPL_VISITOR_COOKIE, verifyLimit.keyPrefix
- test/legacyNames.test.ts: 24 tests for all of the above
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Replaced by an explicit list of forms only (ten exported names, runtime env names, project file
names and marks, commands, skill names, the log prefix, the brand in prose). Package name, import
paths, routes, CSS tokens, data attributes, custom keys, context flags, the cookie and kv keys are
not touched. package.json keeps the five old bin names beside the five new ones.
The old names stop working in this commit and come back as aliases in the next; docs follow.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
A collection of the config that is not named as staff and that a plugin listed after
ipalKit makes the panel's (admin.user) was adopted as a late collection: the plugin's
rule went in front of every rule, also the ones the project wrote. The marker now
holds the operations that had a rule at config time (own); those are left as written
when the collection is handled again, and an operation without one gets the plugin's.
The start log tells this case from a collection a later plugin added.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
A plugin listed after ipalKit that copies a staff collection under a new slug, or reuses its access object, brings
rules the plugin wrote for the ORIGINAL. On 1.16.7 the copy also carried the boolean 'seen' marker and was left
alone: 'the account itself' then meant an account of the original — with numeric ids the original's account with
the same id changed the copy's account (17 of 40 measured shapes).
Design: the plugin never replaces and never rewrites a rule on such a collection. It puts its rule for the copy's
own slug in front, and both must allow: on a copy named as staff in front of every rule; on a copy that is not
staff or keeps its own rules (custom.ipal.accountRules: false) in front of the rules marked as the plugin's for
another collection. The roles field of every copy is guarded. The mark on the plugin's functions says only
{ slug, self }; custom.ipalAccounts says { slug, staff } (a collection named as staff during next dev is handled
on the reload). The plugin's rules are marked before its 2FA guard, which carries the mark.
Accepted cost: a copy's own account cannot edit itself through a copied rule (as on 1.16.7); the copy writes
access.update — one documented line.
Proof: test/accountCopyTableSuite.ts — 40 shapes x accounts x operations, each row not wider than the measurement
taken on 1.16.7 (test/fixtures/copyRulesBaseline.json) and not wider than the plugin's rule; 2FA off and on.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
K-1 the plugin counts roles only from an array (getRoles). A single-valued roles field — a select, text or
relationship without hasMany, a radio — never makes a plugin admin, yet canHoldStaffRole said true: on a
project's own login collection with a single role select nobody could create, change, delete or unlock accounts,
the account holding admin included. rolesAreAList(collection) is now a precondition of the admin rules. The same
for hasPluginRoles: a single select whose values are all the plugin's had the admin rules already in 1.16.7 and
gets 'an account of this collection' now — its accounts manage each other again; the value still grants nothing.
A relationship with hasMany counts (ids that are text).
K-2 staffCollectionsNobodyManages returns { stuck, unchecked } and checks collection by collection: no query where
the field cannot hold admin; a count for a select with hasMany; for text / json / relationship the accounts are
read and the plugin's own test is applied. Where it cannot check it says so and claims nothing.
Tests: the reviewer's shapes over HTTP and the warning's table against a running Payload, 2FA off and on.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
In the released 1.16.7. The plugin's checks go by the value on the account, but a project's own staff collection
without rules got the admin rules only when ALL its role values were the plugin's; otherwise 'an account of this
collection' could create, change and delete accounts. Measured on bc0fa65 (SQLite; the first shape also on Postgres
and MongoDB, 2FA off and on): with roles user/editor/admin/boss, with a text and with a json roles field, config-time
and added by a later plugin, an account with the role user creates an admin (201) who reads Site integrations, changes
another staff collection's roles and lists the panel's accounts (200 / 200 / 200), takes the admin over and deletes it;
with viewer/editor a viewer creates an editor who gets past the access rule of Site settings.
canHoldStaffRole(collection): a roles select with editor or admin among its values, or a roles field whose values
cannot be listed. Then: create / delete / unlock an admin, update an admin or the account itself, roles only by an
admin. A project's own rules win. A warning at start when no staff account is an admin and such a collection exists.
The built-site fixture gets a config-time and a late collection of that kind; nothing here touches copied collections.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The command builds the reference site with both bundlers, checks the public files for a package manifest and runs
the late-staff spec and the published-files check against each built site. A global setup resets the test admins
and their stored 2FA attempt counts before every run, so a spec no longer depends on what ran before it.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
pluginVersion() named package.json relative to its own module. A bundler takes such a file for an asset:
a Turbopack build of a site copied the plugin's whole package.json (dependency lists, scripts, the registry
and repository addresses; no secret) to /_next/static/media/package.<hash>.json, served to anyone. Webpack kept
it on the server side. The version now comes from src/version.ts (scripts/write-version.mjs, run by the
`version` script; a test fails when it differs from package.json). A smoke test of the built site: nothing
under .next/static is a package manifest.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
R3-1 nothing is decided by a function's name any more (a production build renames it): on a collection that
arrives after ipalKit the plugin's rule is put in FRONT of the rule that is there and both must allow
(bothAllow). unlock follows the same table. The log says exactly what was put.
R3-2 the adoption walks the live config (payload.config), which Payload swaps first on a dev reload.
R3-3 readVersions gets the read rule on staff collections.
R3-5 a secret that is not text is refused.
Also: the async check of requireSetup.exempt compares the constructor, not its name.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
R2-1 the SMTP password is bound to server, port and user whatever the transport says; the transport alone is not bound.
R2-2 where the plugin's update rule is in force the roles field is closed for the account itself
(the plugin's roles: only an admin; roles of the project's own: never one's own).
R2-3 auth collections a later plugin adds get the account rules, the password rule and the first-user endpoint when
the config goes live; a staff slug that is not an auth collection stops the start.
R2-4 smtpRequireTls is taken out: the branch adds no field, column or collection.
Also: read (a staff account) and unlock (an admin) defaults on staff collections (accounts.staffOnlyRead);
doctor staff-own-roles and read / unlock in staff-accounts-open; r1 NULL against the default, also inside a row;
r2 bound values compared exactly.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
M1-1 the first-user route is the plugin's own endpoint in front of Payload's; nothing is read from the path.
M1-2 the account rules are put on the collections before the 2FA package wraps them.
M1-6 the admin rule only where the roles are the plugin's; other staff collections: an account of that collection.
update / delete get the matching defaults (accounts.adminOnlyWrite); doctor rule staff-accounts-open.
M1-5 access.firstUserAdmin: false with a role below the panel role: the default panel role steps aside, an explicit one is refused.
M1-3 a save that changes the SMTP server, port, user or encryption must send the password again (secrets.reenterOnChange);
new panel field smtpRequireTls.
M1-4 a restore of a version masks the secrets (maskSecretsOnRestore).
M1-7 a refused origin is logged once with the ways to allow it; default ports are normalised.
Minors: m1 day boundary, m3 e-mail check on reset and bulk update, m4 text of 'all', m5 the mask is never kept.
The account suite runs with 2FA off and on.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The verify count now survives a restart of the site, so the specs can no longer
share one test admin across server runs: create-test-admin.ts makes two test
admins and clears their stored counts; the setup spec signs in as the second.
The whole suite passes in one run (20 passed, 1 skipped).
Co-Authored-By: Claude Fable 5.2 <[email protected]>
R3-2. (b) POST /api/verify-totp and /api/setup-totp refuse a request that a
browser marks as coming from another origin (Origin, Sec-Fetch-Site) — before it
is counted, so another page (a sibling subdomain included) cannot burn an
account's attempts and lock its owner out. Own origins: the request's host,
serverURL, Payload's csrf / cors lists, twoFactor.sameOrigin.origins; requests
without those headers pass. twoFactor.sameOrigin: false turns it off.
(a) The verify count is kept in memory (exact for parallel bursts) and in
Payload's key-value store (payload.kv, no new collection), so a restart or a
second instance does not reset it; the higher count decides, and a failing store
never opens the gate. verifyLimit.store: 'memory' = this instance only.
Doctor: csrf-empty (static, warning) when neither serverURL nor csrf is set.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
IntegrationAlerts reads the admin-only Site integrations global with access
control off and showed its error texts to everyone who opened the dashboard.
Now: an admin sees what is failing and the link, an editor a neutral "an
integration needs attention — ask an administrator", anyone else nothing.
CookieCrawlAlert is shown to editors and above (the role that may read the crawl
result). Both use userMeetsRole, so a session that still owes its second factor
sees neither. dashboardAlerts: { integrations: 'admin' | 'editor' | 'all',
cookies: 'editor' | 'all' } loosens it.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
When a password is set on a staff collection — a new account, the first-user
screen, a change, a reset by e-mail; panel, API and Local API alike — it must
have at least 12 characters and not be the account's own e-mail address.
Existing passwords are never checked: a shorter one keeps logging in and meets
the rule when it is next changed. accounts.password: { minLength } | false.
No breached-password lookup; checkPassword and the hook are exported.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
accounts.adminOnlyCreate (on): a staff collection without a create rule gets
"an admin, fully signed in" instead of Payload's "any logged-in user" — also the
project's own collection; a rule the project wrote stays.
accounts.firstUserRoute ('panel'): Payload's first-user route answers only for
the collection the panel logs in with. For any other empty auth collection it is
refused, unless that collection's own create rule lets an anonymous request in.
Checked and closed: an empty second staff collection, whose first visitor became
a staff admin (test/accountRulesOff.test.ts records the old behaviour, which
accounts: false / firstUserRoute: 'all' still give).
Doctor: open-signup (deep, info) names auth collections with open sign-up.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
The panel opens for editor and above by default: Payload's access.admin on the
collection that carries the roles. An account that holds only `user` sees
"Unauthorized" there; the API is not touched. The rule looks at the role, not
at the second factor, so the 2FA screens stay reachable. accounts.panelRole:
'user' | false (everyone, as before) | 'admin'; accounts: false turns the account
rules off; the project's own access.admin wins. At start the log says how many
accounts the rule keeps out, and is an error when it keeps everyone out.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
While Turnstile is degraded (wrong or missing secret, Cloudflare down) a text
form is still accepted, as before; a submission to the file endpoint is refused
by default. forms.turnstileOnConfigError sets it for every form or per kind
('allow' | 'reject' | { text, files }); a value at a call site still wins.
Nothing changes when Turnstile is off. The gates and the resolver are exported
from the server entry.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
(2) Stage one of the deprecation: TURNSTILE_SECRET_KEY from the environment still
works when the panel field is empty, logs once that it is deprecated, and the
doctor's deep status reports it (rule turnstile-env-key, warning). Nothing is
removed.
(3) access-missing (static, warning): ipalKit without `access` means every panel
account is an admin. turnstile-degraded (deep): Turnstile is not checking forms —
warning, error after a day. The deep status carries the recorded state and where
the secret comes from, never a key.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
smtpPassword and turnstileSecretKey in the Site integrations global are returned
as '********' to every read that goes through access control (REST, GraphQL, the
panel's form state); the Local API with access control off still gets the value.
A save that sends nothing, an empty value or the mask keeps the stored one;
'[[clear]]' removes it. MaskedField says that a value is set and offers to
remove it. Off: secrets: { writeOnly: false }. writeOnlySecret(s) and the hooks
are exported for a project's own fields.
Co-Authored-By: Claude Fable 5.2 <[email protected]>
access.md and the 1.16.4 upgrade notes led projects to import isAdmin from
'@intecion/ipal-kit' in a client component; with `next build --webpack` that
fails ('server-only' cannot be imported from a Client Component module).
No existing entry had a client-safe one, so '@intecion/ipal-kit/client' now
exports hasMinimumRole, isAdmin, isEditor and the type Role; the main entry
keeps them for server code.
Docs: access.md (snippet with imports, server vs client, useConfig() carries
admin.user only), AGENT.md, ipal-debug, ipal-reference, ipal-upgrade, the
1.16.4 note, an Unreleased changelog entry. Tests: /client reaches no
server-only module, the predicates' answers with a client config, no
client-component example in the docs imports the main entry.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
R3-1: the SQL adapters throw "Failed query: …" and put the database's own words
("column … does not exist", "no such column") in the error's cause, so the loud
start-up line never appeared on a real Postgres or SQLite. The reason is now
built from the whole cause chain; other failures (ECONNREFUSED, a locked
database) still only warn. Tested with wrapped errors and against the real
adapter with the column dropped.
Docs and the doctor's fix text name how the migration is applied
(deployment.md 4.3) wherever they said only "before the site serves".
Co-Authored-By: Claude Fable 5.2 <[email protected]>
R2-1: /api/ipal/admin-icon answers with bytes only for a bitmap recognised by its
first bytes (PNG, JPEG, GIF, WebP, ICO, AVIF). An SVG favicon keeps the redirect
to the media file: a site-wide CSP rule overrides a route's own sandbox header,
so the header alone protected nothing in a built site. buildUploadSecurityHeaders
also returns a rule for the icon path, as a second layer.
R2-2: the SQL migration runs when the new container starts (prodMigrations, or
the start command), never in Coolify's pre-deployment command; docs and the log
line say so and point to deployment.md 4.3.
R2-3: requireSetup: null is the default. R2-4: the missing-column log line only
for a column error. R2-5, R2-6: the resetAccess example keeps the code check;
with guard: false the reset endpoint does not exist.
Co-Authored-By: Claude Fable 5.2 <[email protected]>