ONEWEB6.0Docs

Developer Guide 6 — Refusals and troubleshooting

40 min readDeveloper guides

Audience: a developer who knows JS/TS, SQL, HTTP and Docker but is new to ONEWEB 6.0. Sources: CLAUDE.md (authoritative on invariants and gotchas); kernel-poc/src/ (http-server.js, kernel-gate.js, kernel-authz.js, tool-args.js, upsert-guard.js, seed-overlay.js, store-pg.js, kernel-pg.js, gen-migration.js, tools/deploy.js, deploy-app-env.js, deploy-database.js, residency.js, address-guard.js, serve-marker.js, generate-app.js, identity-apply.js, flow-trigger.js, tools/secret.js, tools/hub.js, secret-broker.js, vault-bootstrap.js, hub-worker.js); part-7 (7.9), part-8 (8.8), part-10, training-day-2.md. Siblings: dev-1-getting-started.md · dev-2-recipes.md · dev-3-services-directory.md · dev-4-api-and-mcp.md · dev-5-flows-connections-expressions.md · dev-6-refusals-troubleshooting.md (this file)

ONEWEB refuses rather than guesses (CLAUDE.md, Invariants: "Refuse rather than guess", "Fail closed"). A refusal is therefore not an obstacle to route around. It is the platform telling you which rule you broke, usually naming the fix. This guide is organised so you can start from the text you are looking at.

How to use it:

  • You have an error string: go to D6.2 and search the tables (message text is quoted from source).
  • Something is "just not working" and there is no refusal: go to D6.3 (symptom to cause).
  • You are about to do something irreversible: read D6.4 first.

Conventions. In quoted messages, <…> marks a value the source interpolates at run time (written ${…} in source). Everything else is verbatim. Where I only know the gist of a message I say "gist:" and do not quote it. Items I could not confirm in source are marked "(not verified)". I did not start any service or run any command while writing this, so every command in D6.3 is taken from source or CLAUDE.md, not from a run.


D6.1 How to read a refusal#

D6.1.1 The envelope (HTTP facade)#

The Kernel facade (kernel-poc/src/http-server.js, default :4500, .claude/launch.json uses :4600) answers a tool call at POST /api/tools/<name> with JSON. From http-server.js:

HTTP status Body Meaning
200 { ok: true, result } The tool ran.
401 { ok: false, error } Unauthorized: no established identity. Sign in.
403 { ok: false, error } Forbidden: signed in, but no binding grants the verb here. Another login will not fix it.
404 { error: "unknown tool <name>" } Tool name not registered.
400 { ok: false, error: "the request body is not valid JSON" } Body did not parse.
422 { ok: false, error, problems: [...] } InvalidArguments: the call did not match the tool's inputSchema. problems lists each failure.
422 { ok: false, error, code, problems? } A Refusal (from data-plane.js) with a stable machine-readable code.
422 { ok: false, error } Everything else a handler throws: a refused edit.
500 { error } An unexpected exception outside a tool handler.

Only Refusal instances (Data Studio, secret_set and friends, artifact import, see tools/secret.js, data-plane.js, tools/transfer.js) carry a code.

Direct read routes (/api/artifacts, /api/audit, /api/graph) answer 401 { error: "unauthorized", detail } or 403 { error: "forbidden", detail } instead of the ok:false shape.

The same tools over MCP (mcp-server.js, or HTTP MCP at POST /mcp) go through the same checks (tool-args.js, then authorization, then the handler). See dev-4-api-and-mcp.md for the transports.

D6.1.2 Who produced it#

The order a call travels determines which layer can refuse it, which tells you where to look:

# Layer Produces Source
1 Authentication gate 401 "requires an authenticated caller" kernel-gate.js checkAuthorized
2 Schema validation 422 rejected its arguments + problems tool-args.js checkToolArgs
3 Authorization gate 403 "no binding grants …", "call spans N workspaces …" kernel-authz.js decide / can
4 Edit lock 422 " is locked by … — refusing this write" http-server.js checkLockFor
5 Tool handler 422 with a plain message: validation, references, residency, address guard, secrets, Hub rules tools/*.js
6 Kernel store INVALID, REJECTED patch, COMPOSITION REJECTED, EDITED_SINCE_IMPORT, lifecycle refusals kernel-pg.js, store-pg.js, upsert-guard.js
7 Deploy plan the plan is blocked — …, with blockers that carry a short code (D6.2.6) tools/deploy.js
8 Generator / CLI exit code and stderr text, not JSON generate-app.js, serve-marker.js
flowchart TB A["A tool call"] --> B["1 Authentication gate"] B -->|"refuses"| B1["401 requires an authenticated caller"] B --> C["2 Schema validation"] C -->|"refuses"| C1["422 rejected its arguments, with problems"] C --> D["3 Authorization gate"] D -->|"refuses"| D1["403 no binding grants, or call spans workspaces"] D --> E["4 Edit lock"] E -->|"refuses"| E1["422 is locked by"] E --> F["5 Tool handler"] F -->|"refuses"| F1["422 plain message, or a Refusal with a code"] F --> G["6 Kernel store"] G -->|"refuses"| G1["INVALID, REJECTED patch, EDITED_SINCE_IMPORT, lifecycle"]
Which layer produced the refusal

Deploy-plan blockers (layer 7) and generator output (layer 8) are separate: the plan returns blockers as data, and the generator speaks through stderr and exit codes.

Why the split matters: deploy_plan is read-only and returns blockers as data (each has a code, a message and the tool that fixes it). deploy_start re-plans and, if any blocker remains, throws one error that joins them. So you read the cause in the plan and the consequence in the error.

D6.1.3 Reading habits that save time#

  1. Read the whole message. Refusals list every problem at once (residency, address guard, identity, replay, deploy plan). Fix the set, not the first line.
  2. A message that names a tool tells you the fix. deploy_plan blockers carry the fixing tool as a third field (bundle_add_member, secret_set, workspace_set_environment_network, …).
  3. A refusal is usually correct. Do not loosen a check to get past it. CLAUDE.md states the rule for tests as well: only a connection error is a skip, anything past it is a failure.
  1. Check which backend you are on. Several things exist only on Postgres (deploy runs, the graph API: 501 graph API requires KERNEL_BACKEND=pg). The file backend refuses them by name.
  2. Authz defaults differ. KERNEL_REQUIRE_AUTH defaults on; KERNEL_ENFORCE_BINDINGS defaults off (kernel-gate.js: process.env.KERNEL_ENFORCE_BINDINGS ?? "false"). So a 403 only appears on a facade started with bindings enforced. The Workbench additionally dims a write when workspace_who_can says the signed-in builder lacks the verb, even when the Kernel would accept it (CLAUDE.md, Workbench UI).

D6.2 Refusal catalogue#

Each row: message (verbatim, <…> = interpolated), cause, fix, source. Search this page for the first distinctive words of your error.

D6.2.1 Sign-in, permissions and authorization#

Message Cause Fix Source
<tool> requires an authenticated caller. Sign in at /api/auth/login, or set KERNEL_REQUIRE_AUTH=false to run this Kernel without authentication (offline/dev only — every tool becomes callable by anything that can reach the port). No session on a write or a read. Reads are not exempt. Sign in. Only an offline/dev facade should set KERNEL_REQUIRE_AUTH=false. kernel-gate.js checkAuthorized
this Kernel requires an established identity — sign in at /api/auth/login, or set KERNEL_REQUIRE_AUTH=false … Same, on a direct /api/* read route. Returned as 401 {error:"unauthorized", detail}. Same. kernel-gate.js checkAuthenticated
no binding grants <verb> here — <role> expired <date>; <role> is scoped to <scope>; <role> requires <condition>; role <role> is not defined; <role> does not grant <verb> Signed in, but every binding for you either expired, is scoped elsewhere, has an unmet condition, names an undefined role, or lacks the verb. The text lists which of those happened to each near-miss binding. Read which clause names your role. Ask a workspace admin for the verb, at the right scope (a grant bound to one app does not answer a workspace-wide question). kernel-authz.js can
no binding at all for this principal in this workspace You have no binding in the workspace the call resolved to. Get a binding (People & access). kernel-authz.js can
call spans <N> workspaces (<ids>) — one call cannot be authorized against two binding sets One call named artifacts that live in different workspaces. Refused, never resolved: picking either would be a guess. Split into one call per workspace. kernel-authz.js workspaceForScope
<workspaceId> does not exist, so no binding can be resolved Authz fell back to a workspace id that is not in the store (KERNEL_WORKSPACE fallback, default workspace:default). Place the artifact's app in a real workspace (app_set_workspace) or fix KERNEL_WORKSPACE. kernel-authz.js decide
"<env>" requires approval from <roles> — <sub> holds <roles or "no role"> in <workspace>. <action> needs one of those roles. The environment's requiresApprovalFrom names roles; you hold none. Enforced only when bindings are enforced. Used by deploy_start, bundle promotion, hub_deploy, hub_undeploy. Note it is about named roles, not verbs, so approveProd alone does not satisfy it. Have someone holding one of the named roles act. kernel-authz.js approvalCheck
<artifactId> is locked by <name or "another session"> — refusing this write Another designer session holds the edit lock on that artifact. The lock check scans every string argument of the call. Wait for or release the lock (/api/locks/<id>/…). http-server.js checkLockFor
'<tool>' rejected its arguments — they do not match its inputSchema: <problem>; … (422 with problems[]) The arguments do not satisfy the tool's declared schema. Problem phrases include <path> must be one of "a", "b", <path> has an unknown property "<name>", <path> is missing required "<name>". Fix the argument shape. GET /api/tools lists the schemas. tool-args.js

D6.2.2 Validation: the store rejects your spec#

Message Cause Fix Source
INVALID <kind>: <errors> A create whose spec fails the kind's JSON Schema in kernel-schemas/. Read the listed schema paths; fix the spec. kernel-pg.js
REJECTED patch on <artifactId>: <errors> A patch would leave the artifact invalid. Nothing was written. Fix the patch. kernel-pg.js
COMPOSITION REJECTED at <artifactId>: <errors> and COMPOSITION REJECTED: unknown artifact <artifactId> One step of a multi-tool composition failed, so the whole composition is rejected (one undo step, all or nothing). Fix the named step and resend the composition. kernel-pg.js
unknown artifact <artifactId> The id does not exist in this tenant. Often a typo, a missing kind: prefix, or the wrong store. kernel_list_artifacts. kernel-pg.js, store-pg.js
unknown entity <entityId> / <entityId> has no field "<name>" The entity or field is not there. Check the id and spelling. tools/entity.js
<entityId> already has a field "<name>" — identifiers are case-insensitive on most engines A new field clashes case-insensitively with an existing one. Pick a different name. tools/entity.js
cannot remove "<name>" — still referenced by: <list> A field is used by an index, relation, form widget, row policy and so on. Remove or change the referrers first. kernel_impact shows them. tools/entity.js
cannot remove the last field of <entityId> Self-explanatory. Add another field first. tools/entity.js
<entityId>.<field> not changed: followed by - <reason> lines entity_set_field refused the edit (blocked migration, stale edit, a place that keeps the old name as text, and so on). Re-run with dryRun: true to see the safe/unsafe/blocked classification, then address each reason (or pass acknowledgeDependents exactly as listed). tools/entity.js; behaviour in CLAUDE.md
row filter for role '<role>' is not usable: <message> A row policy expression does not compile (one expression parser, compile-expr.js). Fix the expression. tools/entity.js
writeColumns for role '<role>' names '<c>', which is not a field of this entity (also: names the primary key; names the version column; names it twice) An invalid column grant. Name real, non-key, non-version columns once each. tools/entity.js
the request body is not valid JSON (400) The raw body did not parse. The facade parses itself so V8's message cannot echo a secret. Fix the client. http-server.js

D6.2.3 Upsert guard: EDITED_SINCE_IMPORT and OVERLAY_CONFLICT#

These two are the ones a new developer meets when npm run restore fails a step on a store that has been edited in the Workbench. Background: a seed or import that re-writes an artifact is a three-way comparison (base = what the seed last wrote, stored = now, incoming = the seed's new spec), upsert-guard.js.

Message / code Cause Fix Source
<artifactId> was edited after it was last imported (#<baseSeq>): <N> edit(s) since — <#seq type "note", …>. The incoming spec differs from both what was imported and what is stored now, so replacing it would silently discard those edits. Refused (fail closed): fold the edits into the source and re-run, or replace deliberately with { overwrite: true } (a seed's --force). Code EDITED_SINCE_IMPORT. Variant: (it has no import event at all) instead of (#<baseSeq>). Both the stored artifact and the seed's source moved since the last import. If only the stored one moved, the seed is silently kept, not refused. If only the seed moved, it is replaced. Preferred: node src/seed-adopt.js <id> --dry, then without --dry. It writes a keyed overlay to src/seeds-adopted/<kind>/<name>.json; commit that file. Alternative: fold the edits into the seed source. Last resort: the seed's --force, which discards the edits. upsert-guard.js decideReplace; CLAUDE.md Known gaps
<N> conflict(s) between the seed and the adopted overlay — refused rather than guessed: then one line per conflict <path> (<op>): <reason>. Code OVERLAY_CONFLICT, .conflicts[]. The seed now changes a path that the adopted overlay also changes (to a different value). Reconcile the seed source and the overlay on those paths; re-adopt if the stored artifact has changed again. seed-overlay.js applyOverlay

Notes:

  • Tool calls (buildTools) pass overwrite: true, because a tool call is the explicit request. So you meet this refusal from seed and import scripts, not from the Workbench.
  • Only seeds that write through withSeedOverlays() (los/lib.js) or import-write.js apply overlays. Any other seed stays refused and never overwrites the edits.

D6.2.4 Lifecycle#

Message Cause Fix Source
<artifactId> is archived — content edits are refused; restore it first with artifact_restore Editing an archived artifact. artifact_restore. store-pg.js
<artifactId> is archived — cannot publish Publishing an archived artifact. Restore first. store-pg.js
<artifactId> is already live at seq <N> — nothing to publish artifact_publish on a live, unedited artifact. Nothing to do. store-pg.js
<artifactId> is already archived artifact_archive twice. Nothing to do. store-pg.js
<artifactId> is '<status>', not archived — nothing to restore artifact_restore on a non-archived artifact. Nothing to do. store-pg.js
<bundleId> is archived — restore it before deploying Deploy plan blocker archived. artifact_restore. tools/deploy.js
<artifactId> does not exist kernel_impact on an unknown id. Check the id. tools/impact.js

References and impact (not a refusal, but the first thing to do before removing anything): kernel_impact(artifactId) lists every artifact that depends on it, and GET /api/graph/dangling lists references to nothing. A reference is only rewritten or traced where refSites (kernel.js) sees one, never in free text (CLAUDE.md, Artifact transfer). On a file backend the graph API answers 501 graph API requires KERNEL_BACKEND=pg.

D6.2.5 Migrations: blocked and unsafe#

gen-migration.js classifies every change with SEVERITY = { SAFE: "safe", UNSAFE: "unsafe", BLOCKED: "blocked" }. You see this classification in entity_set_field dry runs, data_migration_plan, and in deploy_plan.

Message Cause Fix Source
-- Version NOT advanced: changes were refused or withheld, so this database / -- remains at seq <N>. Resolve them and regenerate. (comment lines in the emitted SQL) A migration contains a blocked change, or an unsafe one without allowUnsafe. The refused statements are simply not in the SQL, and the recorded schema version does not move. Resolve the blocked change in the model (it cannot be forced), or acknowledge the unsafe ones deliberately. gen-migration.js
-- Version NOT advanced: <kind> <name>, … could not be written, so this database A change could not be emitted at all. Same. gen-migration.js
blocker migration-blocked: <ref>'s migration includes change(s) that cannot succeed on a table with rows — <why> — the model needs to change, not this deploy A change the engine will refuse on populated tables (for example a type pair the engine cannot convert, a primary-key change). Change the model (for example add a column and backfill instead of converting). tools/deploy.js
blocker migration-destructive: <ref>'s migration includes destructive change(s), withheld until acknowledged — <why> — call again with acknowledgeDestructive: ["<ref>"] to accept it A drop that loses data. Decide it is intended; pass acknowledgeDestructive on both deploy_plan and deploy_start (they must match or the digest differs). tools/deploy.js

why strings you will see (verbatim from gen-migration.js): the column and everything in it is deleted; any existing NULL in this column makes the constraint fail — backfill first; validated against existing rows — fails if two of them share a value; deduplicate first; validated against existing rows — fails if any reference a missing parent; table renamed in the artifact. A rename is never inferred: it needs renamedFrom (recorded by entity_set_field with renameTo), otherwise it is a drop plus an add.

D6.2.6 Deploy plan blockers#

deploy_plan (read-only) returns { verdict, blockers: [{code, message, fix}] , gates, digest, steps }. deploy_start re-plans and throws the plan is blocked — <messages joined by "; "> if the verdict is blocked. Other deploy_start errors:

  • the plan changed since it was reviewed (digest <12 chars>… → <12 chars>…) — run deploy_plan again and review what moved
  • <release> is already what runs on <environment> — nothing to deploy
flowchart LR P["deploy_plan"] --> R["The release itself<br/>archived, empty, missing-member,<br/>no-deploy-unit, needs-app,<br/>process-seq-unknown, pinned-not-current"] P --> T["Where it runs<br/>no-target, driver-not-built,<br/>no-hub-runtime, ambiguous-runtime,<br/>decision-runtime-local"] P --> N["Addresses<br/>no-flow-address, no-app-binding,<br/>no-public-host"] P --> E["Engine and data<br/>no-engine, engine-unresolved,<br/>database-not-ready"] P --> A["Approval and review<br/>not-approved, flow-not-reviewed,<br/>decision-not-servable"] P --> M["Migrations<br/>migration-blocked,<br/>migration-destructive"]
Deploy plan blockers by area

The blockers (code, then the message from tools/deploy.js; the third column is the tool the source names as the fix):

Code Message Fix tool
archived <bundleId> is archived — restore it before deploying artifact_restore
empty <bundleId> has no members — nothing to deploy bundle_add_member
no-target "<env>" has no target — say where it runs first env_set_target
driver-not-built the <label> driver is not built yet (<lands>) — "<env>" can be planned only once it lands (AWS has no driver yet) none; pick a built target
missing-member <ref> no longer exists bundle_remove_member
no-deploy-unit <ref> is a <kind>, which has no deploy of its own bundle_remove_member
not-approved <ref> seq <N> is not approved for "<env>" (four-eyes) — <pending>; also four-eyes approval could not be checked: <error> decision_approve (by someone who wrote none of the changes)
needs-app <ref> ships inside <app>, which is not in this release — add the app, or leave <ref> out bundle_add_member
no-engine <ref> is a process, and "<env>" has no engine connection; or <apps> has processes, and its Work Portal is generated against the engine they run on — "<env>" has no engine connection (its Engine database, in the workspace's Environments) workspace_set_environment
engine-unresolved <why> — <fix>; or the engine database's login <KEY> (<ref>) is not in the vault for "<env>" — paste it in <ref>'s Secrets; or whether the engine database's login <KEY> is in the vault could not be read (<error>) workspace_bind_connection / secret_set
no-flow-address the message of engine-address.js (gist: a flow's app has no binding in this environment, so the engine cannot be told where to call it; all such flows are named at once) workspace_set_environment_network
process-seq-unknown <ref> has no version #<N> — that seq does not exist in its history, so this would silently compile its CURRENT version under a false label rather than the one pinned. Re-pin it to a real seq (bundle_add_member) bundle_add_member
no-hub-runtime <ref> runs on the Integration Hub, and "<env>" has no Hub runtime workspace_add_runtime
ambiguous-runtime <ref> is on none of "<env>"'s <N> Hub runtimes — deploy it to one first (hub_deploy), and later releases follow it there hub_deploy
pinned-not-current <ref> is at #<head> now, and this release pins #<seq> — the <driver> driver builds apps from the current version only. Re-pin it (bundle_add_member with seq <head>) or undo the edits since #<seq> (says database changes for a migration member) bundle_add_member
no-app-binding <ref> has no app binding in "<env>" — … (Local: the port its binding's host address names; cluster: the hostname its Ingress/Route serves); or <ref>'s binding does not resolve on the host: <error> workspace_set_environment_network
no-public-host <ref> is bound to <address> in "<env>" — on <driver> that is the pod itself; bind it to the hostname its Route/Ingress serves workspace_set_environment_network
flow-not-reviewed the error from the review check on a Hub flow artifact_publish
database-not-ready <app>'s database <conn>: its owner login <KEY> is not in kv/<path> — paste it, write-only: Data Studio's Set up a database, or <conn>'s Secrets in its Connection editor (secret_set). The deployer makes the schema, tables and Data Studio's logins with it; also …: <error> (database does not resolve) and …: whether its owner login <KEY> is in the vault could not be read (<error>) secret_set
decision-runtime-local <ref> is served by the decision runtime of "<env>", which is built for the Local target only env_set_target
decision-not-servable (the decision runtime's own problem text) bundle_remove_member

Most-hit in practice, in plain words:

  • pinned-not-current: a release pins an old seq of an app or entity, but the Local and cluster drivers build from the current version only. Re-pin to the head seq. Do not undo real edits just to match a pin unless that is what you want.
  • database-not-ready: the app's database owner password is not in OpenBao. Paste it write-only (Data Studio, "Set up a database", or the Connection's Secrets).
  • no-engine / engine-unresolved: a process (or an app with processes) needs the BPM engine connection in that environment; either the Environment lacks an Engine database/API, or its login is not in the vault. The workspace's Environments "Runtime setup" block shows what is unset in the deploy's own words (env_runtime_plan).
  • no-flow-address: a process calls a flow of an app with no address in this environment. The engine calls each flow at its own app's binding, never a default.
  • not-approved: Decision four-eyes. The approver must have written none of the changes since the last approval (a promoted challenger's authors included). Separate from this, deploy four-eyes (env_set_deploy_four_eyes; off by default only for an environment named Dev/Development) is a gate (fourEyes), not a blocker: it appears in gates and the same "the plan is blocked" error carries <title>: <detail>.

Other deploy-time refusals worth knowing:

Message Cause Fix Source
refused — <NAME> <why>; … where each item is e.g. <NAME>: <app> reads it and nothing derives it — put it in <overrides path> (with a hint such as the engine's REST address for OW_BPM_URL), or <NAME>: the vault has no value for it (<purpose>), or <NAME>: its derived value contains <char> — Next would not read it back as written The generated app reads an env var that nothing derives and no override supplies, or its value cannot be written to .env.local safely. All are listed at once and refused before any build. Fill the Environment's Runtime setup, or put the name in .deploy/<ws>/<env>/<app>.env.local; for a missing secret the message prints the vault:import / provision-engine-client.js command. deploy-app-env.js
missing from OpenBao kv/<path>: <KEY> (<what>), … — anything else: npm run vault:import -- --workspace <ws> --env <env> --key <KEY> --file <a file holding the value> The vault lacks values the derivation takes. Run the printed command. deploy-app-env.js
deploy runs live in Postgres — the file backend has no deployer Deploy runs need the Postgres backend. Use KERNEL_BACKEND=pg. tools/deploy.js
Nothing will pick this run up: <note>. / Queued for <N> s — <note>. / Queued, but <note>. No alive deployer heartbeat for that target kind. See D6.3, "Deploy run stays queued". tools/deploy.js

D6.2.7 Residency and stranding#

Residency is enforced at every deploy path (residency.js). The refusals name every violating constraint.

Message Cause Fix Source
residency refused<for subject>: <constraints> — and environment <name> declares no region. Set its region with workspace_set_environment. (or Deploy through a named environment of the app's workspace. when no environment was named) A constraint applies but the target environment has no region. Set the environment's region. residency.js residencyCheck
residency refused<for subject>: <violations>; environment <name> is in <region> (allowed: <regions>) and, when empty, — and no region satisfies every declaration at once The environment's region is outside what the workspace policy and the entities' residencyTags allow. Constraint wording: <by> may only reside in <regions> (entity tag) and <by>'s residency (enforced) allows only <regions> (workspace). Deploy to an allowed region, or change the policy/tag (a decision, since widening moves where rows may go). residency.js
an enforced residency of <regions> would leave <app> with no region to deploy to (<constraints>) — change those entities' residency (entity_set_residency) or the policy first Stranding from the workspace side: the new enforced policy shares no region with an app's entity tags. Edit one side first. tools/workspace.js workspace_set_residency
<entityId> may only reside in <tags>, and <others> — no region satisfies every one, so <app> could be deployed nowhere. Change one side first. Stranding from the entity side. Refused at either edit, so order does not matter. Same. tools/entity.js refuseStrandedTags

D6.2.8 Address guard in Prod#

Message Cause Fix Source
<envName> is a production environment and refuses these addresses: then - service "<name>" (<view>: <address>) is loopback (localhost) / is loopback (127.0.0.0/8) / is link-local (169.254.0.0/16 — the cloud metadata address is here) / is the unspecified address (0.0.0.0/8) / is loopback (::1) / is link-local (fe80::/10) / has no host workspace_set_environment_network on an environment whose name looks like Prod names a loopback, link-local or unspecified address. All offending services are listed. Use a real host name or private-range address. Private ranges and plain hostnames stay allowed. A test fixture that models Prod on localhost must use a host name. address-guard.js, tools/workspace.js

D6.2.9 Flow and Hub refusals#

Message Cause Fix Source
<flowId>: trigger.kind "webhook" … but an HTTP entry point is compiled from \expose` — which carries the policyRef that says how to authenticate it. …` A webhook trigger without expose; compiling it would invent a credential name. Set expose.path/method (and a policyRef) instead (flow_set_expose). trigger.webhook is deprecated. flow-trigger.js
trigger.fileBasket.keyPattern "<p>" has <N> capture groups — exactly one, whose text is the basket key (also: longer than 200 characters; a character outside plain regex syntax; lookaround or a named group) A fileBasket key pattern the Hub cannot use. One capture group, plain syntax. flow-trigger.js
<flowRef> is already deployed on "<runtime>" in <env> — hub_undeploy it there first One flow, one worker. hub_undeploy from the other runtime. tools/hub.js
<flowRef> is not deployed on "<runtime>" in <env>… hub_undeploy or similar on a flow that is not there. Check hub_deployments. tools/hub.js
nothing to roll back to — no earlier good application of <runtime> in <env> differs from its desired state / the desired state already is application #<N> / application #<N> is a <status> attempt — only a state that actually ran can be rolled back to hub_rollback preconditions. Pick an application that ran OK (hub_deployments). tools/hub.js
<flowRef> is now deployed on "<runtime>" in <env> — two workers would both run it; hub_undeploy it there first Rollback would double-run a flow. hub_undeploy first. tools/hub.js
OpenBao at <addr> did not answer (<code>) — is it running? docker compose -f platform-dev/docker-compose.6.0.yml up -d openbao The Hub's secret source is down. Start OpenBao; npm run vault:up. secret-broker.js
OpenBao at <addr> is not initialized — npm run vault:up / … is sealed — npm run vault:up Vault not initialised/unsealed. npm run vault:up. secret-broker.js
no hub-apply AppRole credentials at <file> — npm run vault:up The gitignored AppRole file is missing (typical in a fresh worktree). npm run vault:up, or copy the per-machine files (D6.3). secret-broker.js
OpenBao refused the hub-apply AppRole login (<status>) — its secret may have been rotated; npm run vault:up issues a new one Stale AppRole secret. npm run vault:up. secret-broker.js
the hub-apply AppRole may not read kv/<path>/<key> (403) — its policy covers kv/data/oneweb/* Reading outside the policy. Put the secret under oneweb/<workspace>/<env>/. secret-broker.js
not ready within <N>s — <why> hub:apply waited for the new worker and it never became ready. A failed start is reverted to the last good state only when that state is provably on disk. D6.3, "Hub worker not ready". hub-worker.js
--secrets is gone: secrets come from OpenBao now (npm run vault:up, vault:import). For a file, pass --secrets-file <path> explicitly Using the removed flag. Use --secrets-file. secret-broker.js

Refusals not quoted here exist for soap (wsSecurity refused by name), rest headers (credentials, Host, Content-Length, Camel*, line breaks, {{), file, queue/event/publish triggers, resilience, subFlow and rotation of a Hub-served policy. See dev-5-flows-connections-expressions.md and flow-soap.js, flow-rest.js, flow-file.js, flow-trigger.js, key-rotate.js (messages not quoted here: not verified).

D6.2.10 Generate refusals (generator / CLI)#

The generator speaks through stderr and exit codes, not JSON. The Workbench's Generate button shows the same text verbatim.

Message Cause Fix Source
✗ refused: a dev server is running from <outDir> (or <N> dev servers are running from …), then lines starting next dev reloads every file the moment it lands, so regenerating here would change the app under whoever is using it — half-written, then with prune's deletions. Nothing was written. generate-app.js found a live next dev marker in <out>/.ow-servers/. Exit code is serve-marker.js's "refused" code. Stop that server then generate again (from the Workbench this is the only way); or --out <another dir>; or --while-running (writes anyway and warns). serve-marker.js refusalMessage
If no such server is running, its marker is wrong: delete <marker file(s)> A stale .ow-servers/<pid>.json. A reused pid reads as alive, which errs on the safe side. Delete the named marker file. serve-marker.js
✗ refusing to write into a build/install/marker folder: <paths> A generator output path would land in .next, node_modules or .ow-servers. A generator bug; report it. generate-app.js
(gist) under a live next start, sources are written but .next is never touched The server keeps serving its old build until rebuilt. Rebuild and restart when ready. serve-marker.js header

D6.2.11 Identity apply#

The identity step (identity-apply.js) plans first and refuses all-or-nothing: any refusal applies nothing. Refusals are scoped to the processes the run deploys; another process's problem becomes a note.

Message Cause Fix Source
realm "<realm>" is <reserved> — an app's people cannot sign in there The realm is a reserved one. Choose the organisation's realm (App.identity.realm). identity-apply.js
"<env>" declares no network topology — there is no address to reach its identity provider at The Environment lacks service addresses. Fill the environment's network (workspace_set_environment_network). identity-apply.js
<app> has no address in "<env>" — give it one (App address, workspace_set_environment_network): its sign-in redirect is that address No app binding, so no redirect URI can be made. Set "App address" for that environment. identity-apply.js
"<env>" has no "<view>" view — Keycloak runs in Docker and ends a session in the app at that view's address (back-channel logout); without it a disabled person keeps their session The environment lacks the identity-provider view. Add that network view. identity-apply.js
"<app>" cannot be a Keycloak client id — letters, digits, dot, dash and underscore Invalid app key. Rename. identity-apply.js
<app> names <N> first admin(s) but no user administrator role (app_set_user_admin_role) — there is no role to give them First admins without the role to give. app_set_user_admin_role. identity-apply.js
<appId> is in no workspace — its environments, its address in each and its vault path all belong to one; place it first (app_set_workspace) App not placed. Place it. identity-apply.js
<keys> not in <the vault> — the identity step writes it; run applyIdentity for <app> first A downstream step needs secrets the identity step has not written yet. Run the identity step first. identity-apply.js
status managed outside ONEWEB — left exactly as it is A hand-made client with no owner mark. A status, not a refusal. If you want ONEWEB to manage it, use app_identity_adopt_client (writes only the owner mark); the next Deploy then manages it. identity-apply.js EXTERNAL_NOTE

Also: a differing hand-made object under a name ONEWEB would create is refused by name (messages not quoted: not verified). Keycloak admin access is the scoped oneweb-identity client, never admin-cli; if it is missing the apply refuses by name before reading anything (provision-identity-client.js).

D6.2.12 Secrets#

tools/secret.js throws Refusal objects, so these come back with a code in the 422 body.

Code Message Fix
unknown <id> does not exist / <workspaceId> does not exist Check the id.
not-secret-bearing <id> is a <kind> — only a Policy (its API key) or a Connection (its logins) has secrets Use the right artifact.
not-placed <id> is in no workspace…, so it has no vault path … app_set_workspace (a decision, manageMembers).
no-environment <workspace> declares no environment — add one (workspace_add_environment) before setting a secret for it Add an environment.
unknown-environment <workspace> has no environment "<env>" — it has <list> Use a listed name.
archived <id> is archived — restore it before setting its secrets artifact_restore.
not-a-policy <id> is a <kind>, not a Policy — a Connection's secrets are someone else's, set with secret_set Use secret_set.
not-apikey <id> is auth.type <type>, not apiKey — there is no key to generate Only apiKey policies have a generated key.
already-set <KEY> is already set in <env> (vault v<N>) — the generated app and every deployed process send it, so a new one here would answer them 401. Replace it with an overlap instead: <rotate command> Use npm run key:rotate.
rotating a rotation of <id> is in progress in <env> (<previous> v<N>) while <KEY> is not set — finish or abort it with key:rotate first key:rotate -- finish or abort.
generate-ours <id>'s key is ONEWEB's own — policy_generate_key mints it so no person ever sees it, and key:rotate replaces one in use "Generate ours, paste theirs": do not paste an apiKey policy's key.
agent <sub or "an agent"> may not set a secret: a value a model holds has already been through its context. A person sets it in the Workbench (the Connection editor's write-only field), or an administrator with npm run vault:import A person does it.
not-recorded <KEY> WAS written to the vault (v<N>) for <id> in <env>, … The value is stored but the audit event was not; check secret_status.

D6.3 Symptom to cause#

For each: what you see, the cause (from CLAUDE.md unless stated), and the diagnostic. Commands are from kernel-poc/package.json and the source headers; run them from kernel-poc/ unless noted.

flowchart TB A["Sign-in fails with Invalid parameter redirect_uri"] --> B["Which port is the app listening on?"] B --> C["Compare with the Environment App address<br/>and OW_APP_URL in the app .env.local"] C --> D{"Same port?"} D -->|"no"| E["Change the address in the Environment,<br/>or start the app on the declared port"] D -->|"yes"| F["Compare OW_APP_URL plus /api/auth/callback<br/>with the login client redirect URIs"]
Symptom: login redirect_uri is invalid
flowchart TB A["Run stays queued"] --> B["deploy_status with the run id"] B --> C["Read deployer.note"] C --> D{"What does the note say?"} D -->|"no deployer is running for that target kind"| E["npm run deployer,<br/>or restart the facade"] D -->|"heartbeats could not be read"| F["sql/024 is not applied:<br/>npm run restore"] D -->|"the file backend has no deployer"| G["Use KERNEL_BACKEND=pg:<br/>the file backend has no deployer"]
Symptom: a deploy run stays queued
flowchart TB A["hub:apply says not ready within N seconds"] --> B["Run hub:apply with --dry-run<br/>and read hub_deployments"] B --> C{"An SFTP consumer<br/>whose directory is missing?"} C -->|"yes"| D["Make the inbox, done and failed folders,<br/>then apply again"] C -->|"no"| E["Read the Routes startup lines in the log"] E --> F{"Could the failed start be reverted?"} F -->|"yes"| G["Last good build and hub.env.last-ok are on disk:<br/>hub:apply puts them back and records reverted"] F -->|"no"| H["The output says why: no earlier good application,<br/>build not on disk, or hub.env.last-ok missing or different"]
Symptom: Hub worker not ready

D6.3.1 Sign-in and identity#

Login fails at the identity provider with "Invalid parameter: redirect_uri". The app is running on a port other than the address the Environment declares. Sign-in only accepts redirects to the declared App address (identity-apply.js builds the redirect URIs from it; gen-auth.js sends ${OW_APP_URL}/api/auth/callback). training-day-2.md records it (seen 2026-11-06; the sample app's Dev address is :3111, not :3101). The exact Keycloak wording comes from training-day-2.md, not from ONEWEB source (not verified in source). Diagnose: compare the port the app is listening on with the Environment's "App addresses" and with OW_APP_URL in the app's .env.local. Fix: change the address in the Environment (or start on the declared port), not the identity client.

Login worked yesterday, now silently dead after changing the issuer. The generated app caches OIDC discovery and the JWKS on globalThis for the process lifetime. Any issuer change needs a full restart. Only successes are cached. Diagnose: restart the app. Related: OW_JWT_ISSUER is the only issuer config; the key set is discovered from it (OW_JWKS_URL is an optional override).

A user is locked out of the realm. The oneweb realm locks after 6 failures for 30 minutes (from project experience; not confirmed in source).

Token has no sub/no roles after editing the realm file. A top-level clientScopes array in a realm import REPLACES the built-in scopes; the realm is imported only when absent, so edits need down -v. Attach protocol mappers per client instead.

D6.3.2 Deploys and runs#

Deploy run stays queued forever. No deployer is alive for that target kind. deploy_status says Nothing will pick this run up: <note>. and deploy_start says Queued, but <note>. The Postgres facade normally starts a supervised deployer (KERNEL_DEPLOYER=off turns it off; a deployer started before a code change needs a restart to get new code). Diagnose: call deploy_status with the run id and read deployer.note; if the note says it could not read heartbeats, sql/024 is not applied (npm run restore). Fix: npm run deployer (two deployers are safe), or restart the facade. A file-backend Kernel refuses with deploy runs live in Postgres — the file backend has no deployer.

A second deploy into an environment is refused. One active run per environment is enforced by a unique index (deploy-runs.js). Wait for or cancel the running one (deploy_cancel).

The build step fails with a list of env names. See refused — … in D6.2.6. Supply the missing values; note that a .deploy/<ws>/<env>/<app>.env.local override wins over a derived value.

A deployed app answers 401 on credit-check (or any apiKey-protected flow) after a key change. The app's .env.local is older than the vault, because the app reads its keys at boot. Diagnose: npm run verify:hub-config names a block holding an older vault version. Fix: npm run generate:app-env -- --env Dev (add --dry-run first), then restart the app. Rotate keys only with npm run key:rotate -- <phase> --policy <ref> --env Dev (phases start, deploy, finish, abort).

Work Portal writes all fail closed. The app lacks OW_ENGINE_CLIENT_ID/SECRET (engine writes need the bpm-engine-caller token since D-71). Fix: node src/provision-engine-client.js --workspace <ws> --env <env> (also referenced by the deploy-app-env.js refusal text), then regenerate the app env.

D6.3.3 Hub worker#

hub:apply reports not ready within <N>s — <why>. The new worker never came ready. Readiness gotchas:

  • An SFTP consumer whose directory does not exist takes camel-consumers DOWN. Make the inbox/done/failed folders before applying, and never rm -rf them under a running worker.
  • Quarkus readiness does not list route ids; "exactly these routes" is read from the log (Routes startup (total:N) + one Started <id> line each).
  • A failed start reverts to the last good state only when that state is provably still on disk (the previous build, hub.env.last-ok and secrets.last-ok); otherwise hub:apply records failed and leaves the worker as it is (revertPlan in hub-apply-plan.js). Diagnose: npm run hub:apply -- --dry-run (decision only; --no-revert keeps a failure in place for debugging). hub:apply records every attempt, failures included, as a hub_applied event; hub_deployments shows desired versus last applied.

An SFTP file trigger is silent and hub:apply said success. A stale pinned host key. The worker logs one WARN (JSchChangedHostKeyException) and readiness stays UP.

Only a file actually run through proves an inbox is reachable. npm run verify:file-trigger.

A queue message runs twice or lands in <q>.dlq repeatedly. maximumRetryAttempts=1 runs a failing message twice; only 0 is one attempt. A broker "406 PRECONDITION_FAILED" at startup means a queue exists with different arguments; never declare one by hand.

A Hub route fails at startup with Unexpected token !. Camel's Simple has no unary not. Invert the branches (choice.when falls through, otherwise handles the non-match).

Secrets or headers leak in a response. Fixed 2026-10-10 (owscrub-*); a regression is a bug.

D6.3.4 Generated apps and builds#

.next corruption / a running test broke mid-run after a regen. next dev hot-reloads whatever lands on disk. Since the fix: next dev builds into .next-dev, next build/start into .next; the launcher records servers in .ow-servers/<pid>.json; generate-app.js refuses under a live next dev (D6.2.10). Do not run next dev and next start against one folder. If a build is corrupt: stop all servers for that app and rebuild.

next build fails on a page using useSearchParams(). Needs a <Suspense> boundary.

Generated app reads a column the table does not have (/api/loan_application selects fullName). A stale entity or a clobbered seed. See D6.2.3 and the repair note in CLAUDE.md Known gaps; regenerate from the repaired entity.

Browser tests (TTB suite) fail after a UI change. You changed or removed a data-ow-action / data-ow-region id. test-ui-contract.js pins the list; a removal or rename needs a CONTRACT_VERSION bump and tells the TTB session. A label or class is presentation and should not matter.

DATABASE/migration changes are "not advanced". See D6.2.5; the recorded schema version does not move when changes are refused.

D6.3.5 Fresh checkout, worktree and restore#

npm run test:restore fails at vault:up with OpenBao is initialized but <file> is missing — its unseal key and root token are not here. Restore that file, or reset the vault (docker compose down + remove the baodata volume) and rerun.

ERR_MODULE_NOT_FOUND (for example amqplib). The worktree's kernel-poc/node_modules is stale: npm install first.

npm run restore stops at a step with EDITED_SINCE_IMPORT. D6.2.3. Use seed-adopt.js <id> --dry.

npm test is green here but CI is unverified. Never call CI green or red; no CI run has been read (CLAUDE.md). A green local run is evidence about this Windows machine only.

gen_random_uuid() stops resolving. A SET search_path dropped public.

Postgres JSON compare never matches. jsonb reorders keys; compare with canonical().

Docker path rewritten under Git Bash (docker run -w /src becomes C:/Program Files/Git/src). MSYS_NO_PATHCONV=1 for the whole command; the host side needs pwd -W.

A file is written to D:\Users\… instead of the repo. new URL(p, import.meta.url).pathname loses the drive letter. Use fileURLToPath / path.resolve, and the kernelDataPath() helper for the file backend.

Multi-line edits via node -e corrupted a file. Backticks and ${} are eaten. Use the Edit/Write tools.

D6.3.6 Workbench (designers and tests)#

You edited designer source and nothing changed. pnpm serve runs rsbuild preview against a prebuilt dist/. Run pnpm --filter <pkg> build. The SDK is bundled into every remote, so after an SDK change rebuild every designer that uses it.

Designer never mounts; console shows TypeError: Cannot read properties of undefined (reading 'push') from inside react-dom. The designer was loaded via rsbuild dev, which breaks the Module Federation React singleton. Always run designer/console packages via build + serve when loaded as a remote in the shell; dev is fine only for a package's own Vitest/typecheck loop.

Vitest times out at 5 s only under pnpm -r test. Project experience attributes this to getByRole by name over long lists, since jsdom's style cache drops on every mutation; the advice is to search the picker, not to raise timeouts (from project experience; not confirmed in source or CLAUDE.md).

Typecheck passes in the bundler but fails later. rsbuild and Vitest do not typecheck. Run tsc --noEmit -p packages/<pkg>/tsconfig.json before committing (project notes, not verified in source).

A tooltip, menu or popup is clipped or overflows. Kit popups are top-layer popovers (usePopup); never position: absolute inside a card. Layout is measured in a real browser: pnpm test:layout.

A designer's reload() is missing. designer-contract.test.ts requires every registered designer to implement it, or Undo/Redo shows stale state.

A fetch from a designer returns 401 silently. Fetches outside KernelClient must pass credentials: "include".


D6.4 When to stop and ask#

Refusals are friendly; the following are not. Stop and ask a person (the project owner or the session that owns the area) before:

  1. Overriding a guard. { overwrite: true } or a seed's --force (discards edits), --while-running over someone else's next dev, --no-revert, acknowledgeDestructive, acknowledgeDependents, allowBlocked. Each says "I know". Make sure you do.
  2. Touching other people's state. The singletons are shared: the 6.0 Postgres (:5437), the Kernel facade port, the shell/designer ports (3000–3016), the TTB simulator (:4621 holds one global scenario). Do not restart :4600 or :3000 for a test; use an isolated child facade.
  3. Regenerating a running app. A regen of generated/loan-onboarding ships every uncommitted generator change in the tree and can prune a Hub sidecar or a portal start route (project notes; CLAUDE.md). Ask first.
  4. Placing or moving things. app_set_workspace (manageMembers), a decision, never done to get past not-placed. ttb-los is deliberately kept out of workspace:default; a refusal naming it is expected (project notes).
  5. Residency and security settings. Clearing a residency tag widens where rows may go. Prod address rules. Identity adoption (app_identity_adopt_client). Rotating a real Dev key.
  6. Secrets. Never paste a credential into chat, a file you commit, or a tool whose value is not writeOnly. Do not read a token out of a credential helper to get around a missing login (CLAUDE.md: gh is installed but not authenticated; only the user can sign in).
  7. Demo cases. Do not submit or complete the parked personal-loan demo cases without asking (project notes).
  8. CI. Pushing to any branch starts two Linux jobs. Never claim CI is green; say it is unverified.
  9. Git in a shared tree. Several sessions edit one tree on one branch. Stage explicit paths (never git add -A), read git status --short first, check git diff --cached --stat, and end commits with a Session: trailer.
  10. A refusal you do not understand twice. If, after reading the whole message, kernel_impact, deploy_plan and workspace_who_can still do not explain it, stop. The platform says "refuse rather than guess"; do not guess back.

What to bring when you ask: the exact message, the tool name and arguments (without secret values), the artifact ids, the environment name, the Kernel backend (pg or file), whether bindings are enforced, and what deploy_plan or workspace_who_can said.


D6.5 Honest notes#

  • This guide quotes messages from the source as of the working tree on 2026-11-08, which has uncommitted changes (including in kernel-gate.js and tools.js). Wording may move; search the source if a string does not match.
  • Several refusal messages are built from other modules and are only paraphrased above (flow/replay/soap/rest/file rules, engine-address.js, key-rotate.js, identity "differing hand-made object", fourEyesBlockers' text). They are marked "gist" or "not verified".
  • The pipeline-gate scanners (G2 to G7) are unproven against real tools (CLAUDE.md); a block gate whose tool is not installed fails by design. I did not catalogue its messages.
  • Code-bearing refusals exist only for Refusal instances. Do not write client code that expects code on every 422.