[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758ETSDVB32AYEVMQD2BWRV":3,"skill-same:01M758ETSDVB32AYEVMQD2BWRV":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":6,"ownerDescription":51,"updatedAt":52,"install":53,"resources":66},"01M758ETSDVB32AYEVMQD2BWRV","postgres-schema-design",null,"Postgres schemas with RLS, roles, or migrations.","lukemcqueen\u002Fsteadfaste-fleet","lukemcqueen","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F405240?v=4","01M757MHPAGRXTJAT46SKZP98R","Luke McQueen","01M757MHPZ573KP8DT9GB8SBQ7",4,"MIT","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fpostgres-schema-design\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: postgres-schema-design\ndescription: \"Postgres schemas with RLS, roles, or migrations.\"\nversion: 1.0.0\nauthor: Steadfaste Fleet\nlicense: MIT\nplatforms: [linux, macos]\nmetadata:\n  hermes:\n    tags: [postgres, rls, schema, migration, roles, security, sql]\n    related_skills: [postgres-docker, todo-persistence, shell-scripting, test-driven-development]\n---\n\n# Postgres Schema Design — Fail-Closed Multi-Role Schemas\n\n## When to Use\n\n- Creating a new schema with row-level security (RLS), roles, or a PII gate\n- Adding tables to a shared fleet DB (e.g. `mycortex-postgres`) that other schemas (bus) must not be disturbed by\n- Writing a schema-versioned migration runner or a psql-based test battery\n- Any \"can the reader role see only what it should?\" isolation design\n\n## Core Principles (non-negotiable)\n\n1. **Fail-closed from day one** — RLS enabled + FORCE + policies in the SAME migration file. No \"v001b after first ingest\" fail-open window.\n2. **Role split, not shared superuser** — separate `admin` \u002F `ingest` \u002F `reader` roles. Admin owns registration + grants; ingest does DML on content tables ONLY; reader gets SELECT filtered by RLS.\n3. **PII gate as a DB CHECK constraint** — `CHECK (is_federated = FALSE OR pii_scan_at IS NOT NULL)`. Federation is impossible without a recorded scan, enforced at the DB, not by convention.\n4. **Ownership by superuser** — tables owned by `postgres`\u002F`mycortex` (superuser), never runtime roles. Runtime roles get GRANTs, not ownership.\n5. **Migrate via a runner, never inline DDL in a deploy script** — `fleet-update.sh`-style file copiers have no DDL path. A `schema_version`-gated `migrate.py` invoked AFTER file sync is the DDL path.\n\n## ⚠️ RLS Policy Evaluation Semantics (the #1 gotcha)\n\n**Policy subqueries evaluate with the CALLER's privileges — NOT the table owner's.**\n\nA `USING` expression like `EXISTS (SELECT 1 FROM source_grants g WHERE ...)` fails with\n`ERROR: permission denied for table source_grants` when the querying role lacks\nSELECT on `source_grants` — even though the policy was created by the superuser.\n\n**Fix pattern — SECURITY DEFINER visibility helper:**\n\n```sql\n-- Runs as owner (superuser); caller never needs SELECT on sources\u002Fsource_grants.\nCREATE OR REPLACE FUNCTION mycortex.is_source_visible(p_source_id UUID, p_role TEXT)\nRETURNS boolean LANGUAGE sql SECURITY DEFINER SET search_path = mycortex AS $$\n    SELECT EXISTS (\n        SELECT 1 FROM mycortex.sources s\n        WHERE s.id = p_source_id\n          AND (s.is_federated OR EXISTS (\n                SELECT 1 FROM mycortex.source_grants g\n                WHERE g.source_id = p_source_id AND g.role_name = p_role))\n    );\n$$;\nREVOKE ALL ON FUNCTION mycortex.is_source_visible(UUID, TEXT) FROM PUBLIC;\nGRANT EXECUTE ON FUNCTION mycortex.is_source_visible(UUID, TEXT) TO mycortex_reader;\n\nCREATE POLICY mycortex_pages_select ON mycortex.pages\n    FOR SELECT TO mycortex_reader\n    USING (mycortex.is_source_visible(pages.source_id, current_user));\n```\n\nKey detail: pass `current_user` as an **argument** (evaluated in the caller's context),\nand compare against `g.role_name = p_role` inside the definer-owned function. Do NOT\nread `current_user` inside the function body — SECURITY DEFINER runs as the owner, so\nit would see the owner's name, not the caller's.\n\n**FORCE RLS does NOT create cascades.** A chunks policy that only checks\n`EXISTS (SELECT 1 FROM pages p WHERE p.id = chunk.page_id)` LEAKS isolated chunks:\nthe subquery evaluates with owner (superuser) privileges, which bypass RLS entirely.\nEach dependent-table policy must apply the SAME predicate explicitly (join through\nthe parent to its source and call the visibility helper). Never rely on \"page-level\nRLS cascades\".\n\n## RLS + DML: writer roles need their own policies\n\n`ENABLE ROW LEVEL SECURITY` **default-denies DML for non-owner roles**. A\nreader-only SELECT policy is not enough for the ingest role — its INSERT\u002FUPDATE\u002F\nDELETE\u002FSELECT is blocked until it gets an explicit policy:\n\n```sql\nCREATE POLICY mycortex_pages_ingest ON mycortex.pages\n    FOR ALL TO mycortex_ingest USING (true) WITH CHECK (true);\nCREATE POLICY mycortex_chunks_ingest ON mycortex.content_chunks\n    FOR ALL TO mycortex_ingest USING (true) WITH CHECK (true);\n```\n\nThe role-split boundary lives in the GRANTs (REVOKE ALL on sources from ingest),\nnot in page-level RLS.\n\n## Identity-gating a TRANSITION — the choke point, not the matrix\n\nA role-gated STATE CHANGE has to be enforced where every write path converges. The\ntransition matrix is the wrong place: `transition_allowed(from, to, reason)` is\ndeliberately role-agnostic (IMMUTABLE, takes no identity argument), so an arc only one\nrole may take stays legal for everyone — and the SECURITY DEFINER function that\n\"owns\" it (allowlist inside, no EXECUTE grant for other roles) is bypassed by any\nother writer: the generic upsert function, a CLI `update --status …`, or raw SQL.\nThe gate then reads as enforced and is ADVISORY.\n\n- **Put the identity check in the BEFORE UPDATE TRIGGER** — the single choke point\nevery path fires — not in the matrix, and not only in the gated function.\n- **Key it on `session_user`, never `current_user`.** A SECURITY DEFINER function runs\n  as its OWNER, so `current_user` there is the superuser and `profile_of(current_user)`\n  never matches the real caller. `session_user` is the authenticated role and survives\n  SECURITY DEFINER, so ONE predicate holds for a direct write AND for the gated\n  function's own UPDATE.\n- **One allowlist, one function, no default:** `tasks.is_orchestrator(p_role name)`.\n  A `DEFAULT CURRENT_USER` silently resolves to the DEFINER in exactly the case that\n  matters; make every caller name the identity it means. Grant EXECUTE to the writer\n  roles — an INVOKER trigger calls it with the WRITER's privileges, so a missing grant\n  turns every status change into a permission error.\n- **Gate only the arc that ASSERTS something, and say which arcs stay open.** An\n  approval is a claim (\"this was verified\"); a reject or a stale re-queue is not, and\n  an automated sweep may legitimately drive it. Leave those open and document why.\n- **Exempt the paths that are exempted for a reason, in the same guard.** A story\n  auto-complete that runs inside an AFTER trigger under whatever caller finished the\n  last child must keep its early return, or the guard breaks a path no human drives.\n- **Assert the arc is STILL legal in the matrix** (`transition_allowed('review',\n  'completed')` returns true) so a later reader does not \"fix\" the hole by editing the\n  matrix and silently re-opening it. Identity-gated, not arc-gated.\n- **Before shipping, grep for the OTHER writers of that state** (`SET status`,\n  `status='completed'`, the DML grants). A role-gated function is not the gate; the\n  trigger is. Re-deriving the reachable set is also the honest scope: an RLS\n  `WITH CHECK` that only lets a caller write its OWN rows means the reachable case is\n  \"a worker self-completing its own row\", not \"any agent completing any slice\".\n\n**Delegating a gated arc (capability + recorded authorization).** When a\nrole-only arc dead-ends operationally (the approved identity cannot reach the\nstore the work lives in), widen it WITHOUT weakening the no-self-grade\nprotection:\n- **De-name the allowlist first:** `is_\u003Cholder>(p_role)` becomes\n  `pg_has_role(p_role, '\u003Ccapability_role>', 'MEMBER')` with a NOLOGIN capability\n  role granted to the default holders (IF EXISTS, per-host safe). \"Add a holder\"\n  is now a GRANT — data, queryable, revocable — never a schema edit, and the name\n  list disappears from the SECURITY DEFINER body.\n- **Delegate per INSTANCE, not per holder:** an authorization table (PK on the\n  instance id; verifier; authorized_by; REQUIRED note; created_at; expires_at\n  with `CHECK (expires_at > created_at)`), written only by a SECURITY DEFINER\n  function that re-checks the capability and returns `false` silently to non-\n  holders. The gated function accepts a capability holder OR a live row matching\n  (instance, caller), and CONSUMES the row on the first decision — one-shot and\n  instance-scoped, so self-delegation is impossible and a grant cannot be reused.\n- **Widen EXECUTE so every profile role can CALL the gated function:** callable\n  ≠ authorized — the inside gate stays the authority, and the refusal becomes a\n  testable `false` instead of a `permission denied` layer.\n- **The BEFORE trigger must gain the SAME delegation branch** — it fires under the\n  CALLER's `session_user` and would refuse the very path you opened — via the\n  SECURITY DEFINER visibility helper (the trigger is INVOKER and the\n  authorization table has NO table grants, so a trigger subquery would hit\n  `permission denied for table`). Accept that a granted caller's RAW update also\n  passes the trigger (same session_user): the row is instance-scoped + short-\n  lived, so the exposure is bounded to what the grant names.\n- A never-used grant is inert (expiry); state that in the migration header, and\n  validate loudly (RAISE) on bad delegation input to the AUTHORIZING side while\n  staying silent to non-holders.\n- **When the de-named capability is ALSO used to admit a lower tier, keep the\n  tiers as SEPARATE roles — never let the delegated tier hold `is_\u003Cholder>`\n  membership, or the first OR-branch short-circuits and that tier's own\n  restriction is dead code.** If you de-name `is_\u003Cholder>` to\n  `pg_has_role(…, '\u003Crole>', 'MEMBER')` and then add a designated-verifier tier\n  under the SAME role, every designated holder IS \"\u003Cholder>\" and a predicate\n  like `is_\u003Cholder> OR (designated AND created_by \u003C> caller)` returns true for\n  the designated holder on its own work — the no-self-grade branch never runs.\n  Prove the collapse is impossible with a hermetic battery check that a\n  designated holder is NOT `is_\u003Cholder>` (assert both `pg_has_role(designated\n  role)` on the core role is `f` and the tier's own restriction holds on the\n  owner's own row): a CLEAN plan-review does NOT catch it — the RED battery run\n  is what measures whether a newly-introduced lower tier still obeys its\n  stated restriction.\n\n## NOT NULL DEFAULT gotcha\n\n`DEFAULT current_setting('hostname', true)` returns **NULL** (no such GUC exists),\nviolating NOT NULL on INSERT. Use a literal default (`DEFAULT 'localhost'`) and have\nthe app pass the real value explicitly. Same trap applies to any\n`current_setting('\u003Cnonexistent-guc>', true)`.\n\n## Role-split grant matrix (tested pattern)\n\n| Role | Grants | Denied |\n|------|--------|--------|\n| `*_admin` | ALL on sources + source_grants, CREATE on schema, SELECT on content tables | — (orchestrator-only) |\n| `*_ingest` | SELECT\u002FINSERT\u002FUPDATE\u002FDELETE on pages\u002Fcontent_chunks\u002Fingest_log + sequence USAGE | sources, source_grants, query_log, schema_version (REVOKE ALL) |\n| `*_reader` | SELECT on pages\u002Fcontent_chunks (RLS-filtered), SELECT (id,name,is_federated) on sources, EXECUTE on log function | query_log (REVOKE SELECT), local_path column |\n\nReader needs column-level `GRANT SELECT (id, name, is_federated)` on sources —\nthe CLI resolves `--source` filters by id, but `local_path` stays protected.\n\n## Migration runner pattern\n\n- **Capture the LIVE pre-change definitions BEFORE the deploy that applies the migration.**\n  `pg_get_functiondef()` of the functions you are about to replace is the only \"before\"\n  you will ever get — the deploy applies the migration and the old body is gone, so a\n  before\u002Fafter written afterwards compares the change with itself. Redirect the capture\n  straight into the committed evidence file (never retype it), and assert the new symbol\n  is ABSENT from it (`grep -c is_orchestrator` = 0) to prove it really is the pre-change\n  revision.\n- **Migration files are HISTORIC, not current: a CREATE OR REPLACE replacement\n  must be based on the body as DEPLOYED — the NEWEST migration that rewrote the\n  function — never the file that first introduced it.** Later migrations freely\n  replace parts of an earlier body (e.g. a reason-string early return replaced by\n  a verified precondition), so copying verbatim from the older file resurrects\n  the old — usually weaker — gate, and only a sibling battery assertion catches\n  it. Measure the live body (`pg_get_functiondef()` from a freshly-migrated\n  scratch DB) or read the newest migration that touched the function before\n  writing the replacement.\n- **Build the RED\u002FGREEN pair with the FINAL test file.** Move the new migration file\n  aside, run the battery (RED), restore it, run again (GREEN) — both sides then measure\n  the same probe, and the RED transcript shows the defect rather than an older revision\n  of your own test.\n- `schema_version(version INT PK, applied_at)` table; runner reads `MAX(version)`, applies pending, records — re-run is a **no-op**.\n- **A grant that must follow RUNTIME config belongs OUTSIDE the migration —\n  the version-gated runner applies a migration ONCE, so anything that converges\n  after a later env\u002Foperator change never will if it lives in SQL.** An\n  operator-designated capability (\"who may hold this role\") driven by an env\n  var is a per-update DEPLOY step: `GRANT` the named roles on every run (IF\n  EXISTS, warn-and-skip absent roles, never fail — a host that does not create\n  the role is legitimately skipped). Keep the capability ROLE itself + the\n  predicate in the migration (created once, then stable) and the DESIGNATION\n  in the deploy (re-runnable, convergent, revocable via the recorded REVOKE).\n- Role creation: `DO $$ BEGIN IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname='x') THEN CREATE ROLE x LOGIN; END IF; END $$;` — PG has no `CREATE ROLE IF NOT EXISTS`. Roles are cluster-level; guard idempotently.\n- `--db-name` override so tests target a scratch DB, never prod.\n- Pinned `search_path`, `ON_ERROR_STOP=1`, explicit target DB.\n- Append-only audit: SECURITY DEFINER `log_query()` that reads `application_name` from `pg_stat_activity` (not self-reported) + `REVOKE SELECT` from readers.\n\n## psql test battery pattern (AC verification)\n\nMirror `tests\u002Ftest-bus-schema.sh` style:\n- **Hermeticity guard:** refuse to run against the prod DB name (fail fast: `if [[ \"$TEST_DB\" == \"mycortex\" ]]; then exit 1; fi`).\n- **Scratch DB lifecycle:** `DROP DATABASE IF EXISTS \u003Ctest>` + `CREATE DATABASE \u003Ctest>` + `trap cleanup EXIT`.\n- **Test as the actual role:** `docker exec mycortex-postgres psql -U mycortex_reader -d \u003Ctest>` — the isolation-leak test MUST run as the reader, never superuser.\n- ⚠️ **psql `-t -A` prints command tags:** `$ID=$(psql ... -c \"INSERT ... RETURNING id\")` captures BOTH the id AND the `INSERT 0 1` tag (two lines). Pipe through `head -1` or the multi-line value breaks the next query.\n- **A probe role needs BOTH membership and per-name EXECUTE grants — and the grants\n  belong in the SCRATCH DB.** To drive the WORKER side of a role gate: create a temp\n  profile role with LOGIN, `GRANT \u003Cbase_reader_role> TO \u003Cprobe>` for the table\u002Ffunction\n  privileges, then mirror the host's real per-name grants explicitly — schemas often\n  grant some functions BY NAME to every profile role and the gated one to approvers\n  only, so the probe legitimately holds NO EXECUTE on the gate (that is a layer worth\n  asserting on its own, and it is why the generic write path was the only route open to\n  a worker). ⚠️ **Check which database the harness's superuser variable points at:** a\n  `PSQL_SUPER` defined with `-d \u003Cprod_db>` issues its GRANT against the LIVE store while\n  every other statement targets the scratch DB — it succeeds silently and leaves a\n  standing grant in production. Use the scratch-DB handle for schema grants.\n- **Read a row back as its OWNER.** A personal-scope row is invisible to another\n  profile's role under RLS (`USING: scope='fleet' OR created_by = me`), so a status\n  read-back from the approver's role returns EMPTY — which reads as \"the write failed\"\n  when the write is fine. Read back as the role that owns the row.\n- **A migration that changes a RULE must update the battery assertions that assert the\n  OLD rule.** Grep the battery for the arc\u002Fstatus you changed: a permanently-red\n  assertion is worse than no assertion, because every genuine RED afterwards is\n  indistinguishable from it and the battery's signal is gone. Fix it in the same cycle\n  and name the migration that changed the rule in the comment.\n- **Per-host IF EXISTS grant loops are only testable for roles that EXIST\n  locally** — a widening asserted through one existing role can pass vacuously\n  (that role may have held the grant since an earlier version). Assert\n  `bool_and(has_function_privilege(...))` over the roles that exist AND a static\n  grep guard on the migration SOURCE for the exact (unspaced) role names: a\n  single typo silently skips every grant, because the IF EXISTS guard never\n  matches a misspelled role and no host may exist to catch it.\n- **A multi-file existence guard uses `grep -l | wc -l`, never `grep -c`.**\n  `grep -c` over several files prints a `file:N` line for EVERY file (even the\n  zero-match ones), so the captured value is a multiline list that never equals\n  the literal `0` the guard compares against — a guard that passed as a single\n  file flips to always-FAIL the moment you widen it to a glob. A check that\n  cannot distinguish \"clean\" from \"mechanism broken\" proves nothing either way:\n  match on FILE COUNT and compare to `0`.\n- **Derive identifier spellings from the system or the file bytes, never from a\n  retyped literal — a transcribed split (a space inside a role or container\n  name) re-introduces the exact misspelling the guard exists to catch.** Pull\n  the container from `docker ps --format '{{.Names}}'` and the role shape from\n  `grep -o 'prefix[a-z_]*'` on the source, then paste those into the psql\n  verification; when a fix needs a literal, delete the offending character with\n  a lookahead (`s\u002Fmyc (?=fleet)\u002F\u002Fg`) so the replacement cannot re-typo it.\n- **A battery under `set -eu` dies WITHOUT a Summary when a bare fixture command\n  fails** — the output ends mid-section and looks like a normal end, so the\n  failing command is easy to miss. The failure is usually a fixture problem, not\n  the gate under test: a CHECK constraint can reject the very NEGATIVE-test data\n  you manufactured through the API (an \"already expired\" grant row violates\n  `CHECK (expires_at > created_at)`). Manufacture CHECK-compliant negative\n  fixtures with a direct owner INSERT (all timestamps in the past), and use the\n  API only for what the API legitimately admits.\n- Idempotency check: run migrate.py twice, assert second run reports no-op.\n- Bus-untouched: assert `bus` schema table count unchanged after schema apply.\n\n## Verification checklist\n\n- [ ] Isolation-leak test runs AS the reader role and returns zero rows for isolated sources\n- [ ] Chunks policy applies the same predicate explicitly (no cascade reliance)\n- [ ] Ingest role's DML works (has its own ALL policies)\n- [ ] PII CHECK rejects federated-without-scan\n- [ ] Migrate re-run is a no-op\n- [ ] query_log: reader can EXECUTE the log function but not SELECT\u002FINSERT the table\n- [ ] The gated arc is refused for a non-privileged caller on EVERY write path (upsert function AND raw UPDATE)\n- [ ] The gated arc is still legal in `transition_allowed` (identity-gated, not arc-gated)\n- [ ] The privileged path still works end-to-end, and the deliberately-open arcs still pass\n- [ ] Bus schema untouched after apply\n\n## Related\n\n- `references\u002Fmycortex-v001-case.md` — concrete failure transcripts + fixes from the first fail-closed schema (mycortex v001)\n- `references\u002Fverifying-a-schema-guard-live.md` — the rolled-back live proof (`SET LOCAL SESSION AUTHORIZATION` + `ROLLBACK`), the deployed-body probe, and the residue assertion that separate \"the migration is right\" from \"the host is running it\"\n- `postgres-docker` — tuning\u002Fconfig the shared container\n- `todo-persistence` — the `sg docker` psql wrapper pattern (reuse it)\n","# Postgres Schema Design — Fail-Closed Multi-Role Schemas\n\n## When to Use\n\n- Creating a new schema with row-level security (RLS), roles, or a PII gate\n- Adding tables to a shared fleet DB (e.g. `mycortex-postgres`) that other schemas (bus) must not be disturbed by\n- Writing a schema-versioned migration runner or a psql-based test battery\n- Any \"can the reader role see only what it should?\" isolation design\n\n## Core Principles (non-negotiable)\n\n1. **Fail-closed from day one** — RLS enabled + FORCE + policies in the SAME migration file. No \"v001b after first ingest\" fail-open window.\n2. **Role split, not shared superuser** — separate `admin` \u002F `ingest` \u002F `reader` roles. Admin owns registration + grants; ingest does DML on content tables ONLY; reader gets SELECT filtered by RLS.\n3. **PII gate as a DB CHECK constraint** — `CHECK (is_federated = FALSE OR pii_scan_at IS NOT NULL)`. Federation is impossible without a recorded scan, enforced at the DB, not by convention.\n4. **Ownership by superuser** — tables owned by `postgres`\u002F`mycortex` (superuser), never runtime roles. Runtime roles get GRANTs, not ownership.\n5. **Migrate via a runner, never inline DDL in a deploy script** — `fleet-update.sh`-style file copiers have no DDL path. A `schema_version`-gated `migrate.py` invoked AFTER file sync is the DDL path.\n\n## ⚠️ RLS Policy Evaluation Semantics (the #1 gotcha)\n\n**Policy subqueries evaluate with the CALLER's privileges — NOT the table owner's.**\n\nA `USING` expression like `EXISTS (SELECT 1 FROM source_grants g WHERE ...)` fails with\n`ERROR: permission denied for table source_grants` when the querying role lacks\nSELECT on `source_grants` — even though the policy was created by the superuser.\n\n**Fix pattern — SECURITY DEFINER visibility helper:**\n\n```sql\n-- Runs as owner (superuser); caller never needs SELECT on sources\u002Fsource_grants.\nCREATE OR REPLACE FUNCTION mycortex.is_source_visible(p_source_id UUID, p_role TEXT)\nRETURNS boolean LANGUAGE sql SECURITY DEFINER SET search_path = mycortex AS $$\n    SELECT EXISTS (\n        SELECT 1 FROM mycortex.sources s\n        WHERE s.id = p_source_id\n          AND (s.is_federated OR EXISTS (\n                SELECT 1 FROM mycortex.source_grants g\n                WHERE g.source_id = p_source_id AND g.role_name = p_role))\n    );\n$$;\nREVOKE ALL ON FUNCTION mycortex.is_source_visible(UUID, TEXT) FROM PUBLIC;\nGRANT EXECUTE ON FUNCTION mycortex.is_source_visible(UUID, TEXT) TO mycortex_reader;\n\nCREATE POLICY mycortex_pages_select ON mycortex.pages\n    FOR SELECT TO mycortex_reader\n    USING (mycortex.is_source_visible(pages.source_id, current_user));\n```\n\nKey detail: pass `current_user` as an **argument** (evaluated in the caller's context),\nand compare against `g.role_name = p_role` inside the definer-owned function. Do NOT\nread `current_user` inside the function body — SECURITY DEFINER runs as the owner, so\nit would see the owner's name, not the caller's.\n\n**FORCE RLS does NOT create cascades.** A chunks policy that only checks\n`EXISTS (SELECT 1 FROM pages p WHERE p.id = chunk.page_id)` LEAKS isolated chunks:\nthe subquery evaluates with owner (superuser) privileges, which bypass RLS entirely.\nEach dependent-table policy must apply the SAME predicate explicitly (join through\nthe parent to its source and call the visibility helper). Never rely on \"page-level\nRLS cascades\".\n\n## RLS + DML: writer roles need their own policies\n\n`ENABLE ROW LEVEL SECURITY` **default-denies DML for non-owner roles**. A\nreader-only SELECT policy is not enough for the ingest role — its INSERT\u002FUPDATE\u002F\nDELETE\u002FSELECT is blocked until it gets an explicit policy:\n\n```sql\nCREATE POLICY mycortex_pages_ingest ON mycortex.pages\n    FOR ALL TO mycortex_ingest USING (true) WITH CHECK (true);\nCREATE POLICY mycortex_chunks_ingest ON mycortex.content_chunks\n    FOR ALL TO mycortex_ingest USING (true) WITH CHECK (true);\n```\n\nThe role-split boundary lives in the GRANTs (REVOKE ALL on sources from ingest),\nnot in page-level RLS.\n\n## Identity-gating a TRANSITION — the choke point, not the matrix\n\nA role-gated STATE CHANGE has to be enforced where every write path converges. The\ntransition matrix is the wrong place: `transition_allowed(from, to, reason)` is\ndeliberately role-agnostic (IMMUTABLE, takes no identity argument), so an arc only one\nrole may take stays legal for everyone — and the SECURITY DEFINER function that\n\"owns\" it (allowlist inside, no EXECUTE grant for other roles) is bypassed by any\nother writer: the generic upsert function, a CLI `update --status …`, or raw SQL.\nThe gate then reads as enforced and is ADVISORY.\n\n- **Put the identity check in the BEFORE UPDATE TRIGGER** — the single choke point\nevery path fires — not in the matrix, and not only in the gated function.\n- **Key it on `session_user`, never `current_user`.** A SECURITY DEFINER function runs\n  as its OWNER, so `current_user` there is the superuser and `profile_of(current_user)`\n  never matches the real caller. `session_user` is the authenticated role and survives\n  SECURITY DEFINER, so ONE predicate holds for a direct write AND for the gated\n  function's own UPDATE.\n- **One allowlist, one function, no default:** `tasks.is_orchestrator(p_role name)`.\n  A `DEFAULT CURRENT_USER` silently resolves to the DEFINER in exactly the case that\n  matters; make every caller name the identity it means. Grant EXECUTE to the writer\n  roles — an INVOKER trigger calls it with the WRITER's privileges, so a missing grant\n  turns every status change into a permission error.\n- **Gate only the arc that ASSERTS something, and say which arcs stay open.** An\n  approval is a claim (\"this was verified\"); a reject or a stale re-queue is not, and\n  an automated sweep may legitimately drive it. Leave those open and document why.\n- **Exempt the paths that are exempted for a reason, in the same guard.** A story\n  auto-complete that runs inside an AFTER trigger under whatever caller finished the\n  last child must keep its early return, or the guard breaks a path no human drives.\n- **Assert the arc is STILL legal in the matrix** (`transition_allowed('review',\n  'completed')` returns true) so a later reader does not \"fix\" the hole by editing the\n  matrix and silently re-opening it. Identity-gated, not arc-gated.\n- **Before shipping, grep for the OTHER writers of that state** (`SET status`,\n  `status='completed'`, the DML grants). A role-gated function is not the gate; the\n  trigger is. Re-deriving the reachable set is also the honest scope: an RLS\n  `WITH CHECK` that only lets a caller write its OWN rows means the reachable case is\n  \"a worker self-completing its own row\", not \"any agent completing any slice\".\n\n**Delegating a gated arc (capability + recorded authorization).** When a\nrole-only arc dead-ends operationally (the approved identity cannot reach the\nstore the work lives in), widen it WITHOUT weakening the no-self-grade\nprotection:\n- **De-name the allowlist first:** `is_\u003Cholder>(p_role)` becomes\n  `pg_has_role(p_role, '\u003Ccapability_role>', 'MEMBER')` with a NOLOGIN capability\n  role granted to the default holders (IF EXISTS, per-host safe). \"Add a holder\"\n  is now a GRANT — data, queryable, revocable — never a schema edit, and the name\n  list disappears from the SECURITY DEFINER body.\n- **Delegate per INSTANCE, not per holder:** an authorization table (PK on the\n  instance id; verifier; authorized_by; REQUIRED note; created_at; expires_at\n  with `CHECK (expires_at > created_at)`), written only by a SECURITY DEFINER\n  function that re-checks the capability and returns `false` silently to non-\n  holders. The gated function accepts a capability holder OR a live row matching\n  (instance, caller), and CONSUMES the row on the first decision — one-shot and\n  instance-scoped, so self-delegation is impossible and a grant cannot be reused.\n- **Widen EXECUTE so every profile role can CALL the gated function:** callable\n  ≠ authorized — the inside gate stays the authority, and the refusal becomes a\n  testable `false` instead of a `permission denied` layer.\n- **The BEFORE trigger must gain the SAME delegation branch** — it fires under the\n  CALLER's `session_user` and would refuse the very path you opened — via the\n  SECURITY DEFINER visibility helper (the trigger is INVOKER and the\n  authorization table has NO table grants, so a trigger subquery would hit\n  `permission denied for table`). Accept that a granted caller's RAW update also\n  passes the trigger (same session_user): the row is instance-scoped + short-\n  lived, so the exposure is bounded to what the grant names.\n- A never-used grant is inert (expiry); state that in the migration header, and\n  validate loudly (RAISE) on bad delegation input to the AUTHORIZING side while\n  staying silent to non-holders.\n- **When the de-named capability is ALSO used to admit a lower tier, keep the\n  tiers as SEPARATE roles — never let the delegated tier hold `is_\u003Cholder>`\n  membership, or the first OR-branch short-circuits and that tier's own\n  restriction is dead code.** If you de-name `is_\u003Cholder>` to\n  `pg_has_role(…, '\u003Crole>', 'MEMBER')` and then add a designated-verifier tier\n  under the SAME role, every designated holder IS \"\u003Cholder>\" and a predicate\n  like `is_\u003Cholder> OR (designated AND created_by \u003C> caller)` returns true for\n  the designated holder on its own work — the no-self-grade branch never runs.\n  Prove the collapse is impossible with a hermetic battery check that a\n  designated holder is NOT `is_\u003Cholder>` (assert both `pg_has_role(designated\n  role)` on the core role is `f` and the tier's own restriction holds on the\n  owner's own row): a CLEAN plan-review does NOT catch it — the RED battery run\n  is what measures whether a newly-introduced lower tier still obeys its\n  stated restriction.\n\n## NOT NULL DEFAULT gotcha\n\n`DEFAULT current_setting('hostname', true)` returns **NULL** (no such GUC exists),\nviolating NOT NULL on INSERT. Use a literal default (`DEFAULT 'localhost'`) and have\nthe app pass the real value explicitly. Same trap applies to any\n`current_setting('\u003Cnonexistent-guc>', true)`.\n\n## Role-split grant matrix (tested pattern)\n\n| Role | Grants | Denied |\n|------|--------|--------|\n| `*_admin` | ALL on sources + source_grants, CREATE on schema, SELECT on content tables | — (orchestrator-only) |\n| `*_ingest` | SELECT\u002FINSERT\u002FUPDATE\u002FDELETE on pages\u002Fcontent_chunks\u002Fingest_log + sequence USAGE | sources, source_grants, query_log, schema_version (REVOKE ALL) |\n| `*_reader` | SELECT on pages\u002Fcontent_chunks (RLS-filtered), SELECT (id,name,is_federated) on sources, EXECUTE on log function | query_log (REVOKE SELECT), local_path column |\n\nReader needs column-level `GRANT SELECT (id, name, is_federated)` on sources —\nthe CLI resolves `--source` filters by id, but `local_path` stays protected.\n\n## Migration runner pattern\n\n- **Capture the LIVE pre-change definitions BEFORE the deploy that applies the migration.**\n  `pg_get_functiondef()` of the functions you are about to replace is the only \"before\"\n  you will ever get — the deploy applies the migration and the old body is gone, so a\n  before\u002Fafter written afterwards compares the change with itself. Redirect the capture\n  straight into the committed evidence file (never retype it), and assert the new symbol\n  is ABSENT from it (`grep -c is_orchestrator` = 0) to prove it really is the pre-change\n  revision.\n- **Migration files are HISTORIC, not current: a CREATE OR REPLACE replacement\n  must be based on the body as DEPLOYED — the NEWEST migration that rewrote the\n  function — never the file that first introduced it.** Later migrations freely\n  replace parts of an earlier body (e.g. a reason-string early return replaced by\n  a verified precondition), so copying verbatim from the older file resurrects\n  the old — usually weaker — gate, and only a sibling battery assertion catches\n  it. Measure the live body (`pg_get_functiondef()` from a freshly-migrated\n  scratch DB) or read the newest migration that touched the function before\n  writing the replacement.\n- **Build the RED\u002FGREEN pair with the FINAL test file.** Move the new migration file\n  aside, run the battery (RED), restore it, run again (GREEN) — both sides then measure\n  the same probe, and the RED transcript shows the defect rather than an older revision\n  of your own test.\n- `schema_version(version INT PK, applied_at)` table; runner reads `MAX(version)`, applies pending, records — re-run is a **no-op**.\n- **A grant that must follow RUNTIME config belongs OUTSIDE the migration —\n  the version-gated runner applies a migration ONCE, so anything that converges\n  after a later env\u002Foperator change never will if it lives in SQL.** An\n  operator-designated capability (\"who may hold this role\") driven by an env\n  var is a per-update DEPLOY step: `GRANT` the named roles on every run (IF\n  EXISTS, warn-and-skip absent roles, never fail — a host that does not create\n  the role is legitimately skipped). Keep the capability ROLE itself + the\n  predicate in the migration (created once, then stable) and the DESIGNATION\n  in the deploy (re-runnable, convergent, revocable via the recorded REVOKE).\n- Role creation: `DO $$ BEGIN IF NOT EXISTS (SELECT FROM pg_roles WHERE rolname='x') THEN CREATE ROLE x LOGIN; END IF; END $$;` — PG has no `CREATE ROLE IF NOT EXISTS`. Roles are cluster-level; guard idempotently.\n- `--db-name` override so tests target a scratch DB, never prod.\n- Pinned `search_path`, `ON_ERROR_STOP=1`, explicit target DB.\n- Append-only audit: SECURITY DEFINER `log_query()` that reads `application_name` from `pg_stat_activity` (not self-reported) + `REVOKE SELECT` from readers.\n\n## psql test battery pattern (AC verification)\n\nMirror `tests\u002Ftest-bus-schema.sh` style:\n- **Hermeticity guard:** refuse to run against the prod DB name (fail fast: `if [[ \"$TEST_DB\" == \"mycortex\" ]]; then exit 1; fi`).\n- **Scratch DB lifecycle:** `DROP DATABASE IF EXISTS \u003Ctest>` + `CREATE DATABASE \u003Ctest>` + `trap cleanup EXIT`.\n- **Test as the actual role:** `docker exec mycortex-postgres psql -U mycortex_reader -d \u003Ctest>` — the isolation-leak test MUST run as the reader, never superuser.\n- ⚠️ **psql `-t -A` prints command tags:** `$ID=$(psql ... -c \"INSERT ... RETURNING id\")` captures BOTH the id AND the `INSERT 0 1` tag (two lines). Pipe through `head -1` or the multi-line value breaks the next query.\n- **A probe role needs BOTH membership and per-name EXECUTE grants — and the grants\n  belong in the SCRATCH DB.** To drive the WORKER side of a role gate: create a temp\n  profile role with LOGIN, `GRANT \u003Cbase_reader_role> TO \u003Cprobe>` for the table\u002Ffunction\n  privileges, then mirror the host's real per-name grants explicitly — schemas often\n  grant some functions BY NAME to every profile role and the gated one to approvers\n  only, so the probe legitimately holds NO EXECUTE on the gate (that is a layer worth\n  asserting on its own, and it is why the generic write path was the only route open to\n  a worker). ⚠️ **Check which database the harness's superuser variable points at:** a\n  `PSQL_SUPER` defined with `-d \u003Cprod_db>` issues its GRANT against the LIVE store while\n  every other statement targets the scratch DB — it succeeds silently and leaves a\n  standing grant in production. Use the scratch-DB handle for schema grants.\n- **Read a row back as its OWNER.** A personal-scope row is invisible to another\n  profile's role under RLS (`USING: scope='fleet' OR created_by = me`), so a status\n  read-back from the approver's role returns EMPTY — which reads as \"the write failed\"\n  when the write is fine. Read back as the role that owns the row.\n- **A migration that changes a RULE must update the battery assertions that assert the\n  OLD rule.** Grep the battery for the arc\u002Fstatus you changed: a permanently-red\n  assertion is worse than no assertion, because every genuine RED afterwards is\n  indistinguishable from it and the battery's signal is gone. Fix it in the same cycle\n  and name the migration that changed the rule in the comment.\n- **Per-host IF EXISTS grant loops are only testable for roles that EXIST\n  locally** — a widening asserted through one existing role can pass vacuously\n  (that role may have held the grant since an earlier version). Assert\n  `bool_and(has_function_privilege(...))` over the roles that exist AND a static\n  grep guard on the migration SOURCE for the exact (unspaced) role names: a\n  single typo silently skips every grant, because the IF EXISTS guard never\n  matches a misspelled role and no host may exist to catch it.\n- **A multi-file existence guard uses `grep -l | wc -l`, never `grep -c`.**\n  `grep -c` over several files prints a `file:N` line for EVERY file (even the\n  zero-match ones), so the captured value is a multiline list that never equals\n  the literal `0` the guard compares against — a guard that passed as a single\n  file flips to always-FAIL the moment you widen it to a glob. A check that\n  cannot distinguish \"clean\" from \"mechanism broken\" proves nothing either way:\n  match on FILE COUNT and compare to `0`.\n- **Derive identifier spellings from the system or the file bytes, never from a\n  retyped literal — a transcribed split (a space inside a role or container\n  name) re-introduces the exact misspelling the guard exists to catch.** Pull\n  the container from `docker ps --format '{{.Names}}'` and the role shape from\n  `grep -o 'prefix[a-z_]*'` on the source, then paste those into the psql\n  verification; when a fix needs a literal, delete the offending character with\n  a lookahead (`s\u002Fmyc (?=fleet)\u002F\u002Fg`) so the replacement cannot re-typo it.\n- **A battery under `set -eu` dies WITHOUT a Summary when a bare fixture command\n  fails** — the output ends mid-section and looks like a normal end, so the\n  failing command is easy to miss. The failure is usually a fixture problem, not\n  the gate under test: a CHECK constraint can reject the very NEGATIVE-test data\n  you manufactured through the API (an \"already expired\" grant row violates\n  `CHECK (expires_at > created_at)`). Manufacture CHECK-compliant negative\n  fixtures with a direct owner INSERT (all timestamps in the past), and use the\n  API only for what the API legitimately admits.\n- Idempotency check: run migrate.py twice, assert second run reports no-op.\n- Bus-untouched: assert `bus` schema table count unchanged after schema apply.\n\n## Verification checklist\n\n- [ ] Isolation-leak test runs AS the reader role and returns zero rows for isolated sources\n- [ ] Chunks policy applies the same predicate explicitly (no cascade reliance)\n- [ ] Ingest role's DML works (has its own ALL policies)\n- [ ] PII CHECK rejects federated-without-scan\n- [ ] Migrate re-run is a no-op\n- [ ] query_log: reader can EXECUTE the log function but not SELECT\u002FINSERT the table\n- [ ] The gated arc is refused for a non-privileged caller on EVERY write path (upsert function AND raw UPDATE)\n- [ ] The gated arc is still legal in `transition_allowed` (identity-gated, not arc-gated)\n- [ ] The privileged path still works end-to-end, and the deliberately-open arcs still pass\n- [ ] Bus schema untouched after apply\n\n## Related\n\n- `references\u002Fmycortex-v001-case.md` — concrete failure transcripts + fixes from the first fail-closed schema (mycortex v001)\n- `references\u002Fverifying-a-schema-guard-live.md` — the rolled-back live proof (`SET LOCAL SESSION AUTHORIZATION` + `ROLLBACK`), the deployed-body probe, and the residue assertion that separate \"the migration is right\" from \"the host is running it\"\n- `postgres-docker` — tuning\u002Fconfig the shared container\n- `todo-persistence` — the `sg docker` psql wrapper pattern (reuse it)\n",{"name":5,"author":24,"license":15,"version":25,"metadata":26,"platforms":41,"description":7},"Steadfaste Fleet","1.0.0",{"hermes":27},{"tags":28,"related_skills":36},[29,30,31,32,33,34,35],"postgres","rls","schema","migration","roles","security","sql",[37,38,39,40],"postgres-docker","todo-persistence","shell-scripting","test-driven-development",[42,43],"linux","macos","main","9dc0e92c5fa81d4db5292b205716e8ea0c00d10e","skills\u002Fdevops\u002Fpostgres-schema-design",1,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet","steadfaste.com","https:\u002F\u002Fgithub.com\u002Flukemcqueen","AI Architect | Building Hermes Cortex: governed multi-agent AI for autonomous software engineering | Enterprise Tech Consultant","2026-11-14 22:33:34",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill postgres-schema-design",{"tool":59,"command":60},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill postgres-schema-design",{"tool":62,"command":63},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill postgres-schema-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fpostgres-schema-design\u002FSKILL.md",true,[67,73],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Fmycortex-v001-case.md","REFERENCE","参考文档",5074,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fpostgres-schema-design\u002Freferences\u002Fmycortex-v001-case.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fverifying-a-schema-guard-live.md",3365,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fpostgres-schema-design\u002Freferences\u002Fverifying-a-schema-guard-live.md",[78,86,93,100,107,114],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":85},"01M7DXY4G8NSVB59K8B6S2AQNP","macbook-linux-maintenance","Legacy MacBook Linux fixes: GPU wedge, reboot hang, thermal.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmacbook-linux-maintenance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":85},"01M7DXXYJCXFJ3TGB84ZQ8KFE6","governance-regression-triage","Triage a host's governance issues: what changed.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-regression-triage\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":85},"01M7DXXSAP1G8FDRJAMXQGBBMK","enforcement-immutability","Use when enforcement files lose their immutable flag.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fenforcement-immutability\u002FSKILL.md",[],[],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":106,"publishedAt":85},"01M78SSDQVRYX64Y16X32TC0NS","steadfaste-fleet-repo-deploy","Use when committing to the steadfaste-fleet repo.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-repo-deploy\u002FSKILL.md",[],[],{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":85},"01M78SS928F3R2RJAYVW4E30CE","steadfaste-fleet-maintenance","Maintain an installed Steadfaste Fleet instance — update both the upstream Hermes Agent and the fleet repo layer, merge diverged histories, sync skills safely, and troubleshoot common issues. Covers the dual-update workflow (hermes update + fleet-update.sh), encrypted brain data backup, mycortex import, and recovery techniques.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fsteadfaste-fleet-maintenance\u002FSKILL.md",[],[],{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":85},"01M78SP1CHW0T0BWE5ZT6JBPX8","fleet-preflight","DEPRECATED alias — merged into survey-before-action (2026-08-20). Load survey-before-action instead; its \"Repo-Specific Pre-Flight\" section covers git search, Hermes boundary, and deployment verification.","https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Ffleet-preflight\u002FSKILL.md",[],[]]