[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758846G9MVC1EFRF4QAVAH5":3,"skill-same:01M758846G9MVC1EFRF4QAVAH5":75},{"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":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":47,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M758846G9MVC1EFRF4QAVAH5","governance-lock-lifecycle",null,"Use when blocked after fleet update or end_change rejects.","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\u002Fgovernance-lock-lifecycle\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: governance-lock-lifecycle\nversion: 1.1.0\ncategory: devops\ndescription: \"Use when blocked after fleet update or end_change rejects.\"\nauthor: Steadfaste Fleet curator\nlicense: MIT\nplatforms: [linux, macos]\nmetadata:\n  hermes:\n    tags: [governance, lock, fleet-update, loop-governance, deploy]\n    related_skills: [loop-governance, fleet-deployment-sync, fleet-preflight, two-hard-rules]\n---\n\n# Governance Lock Lifecycle During Deploy Operations\n\n**Class of task:** any session that runs `fleet-update.sh` (or any deploy that triggers `purge-stale-governance-locks.py`), then hits `GOVERNANCE LOCK REQUIRED` on a subsequent tool call, or finds `end_change` rejecting with \"no scored cycle\". Also covers the \"pull latest → update → doctor → fix\" loop.\n\n## The Core Mechanic\n\n`fleet-update.sh` runs `purge-stale-governance-locks.py` at the **END of EVERY run** — it removes **every** `.governance-*.json` lock file, **including your active session's lock**. This is by design (Pitfall 4 in `fleet-deployment-sync`), but the blast radius is bigger than most agents expect:\n\n1. **ALL terminal is gated, not just writes.** The enforcer's `GOVERNANCE LOCK REQUIRED` fires on ANY `terminal()` call without an active lock — even a read-only `grep` of the update log. `ls`, `grep`, `cat`, `git status` all blocked until you re-acquire.\n2. **`read_file` \u002F `search_files` \u002F `skill_view` are NOT gated.** These are the escape hatch for inspecting output between the purge and your re-acquire.\n3. **Each re-acquire creates a NEW pending cycle** under the same `task_id`. Two re-acquires → three pending cycles total (original + 2). All must be scored before `end_change()` or it rejects.\n\n## The Working Sequence (verified 2026-08-03)\n\n```text\nbegin_change(task_id=\"pull-latest-fleet-update\")     # cycle #1\ngit pull --rebase --autostash origin main\nfleet-update.sh > \u002Ftmp\u002Fupdate-full.log 2>&1          # redirect UNDER the lock\n                                                      #   ← purge fires, lock GONE\n# terminal() now blocked — use read_file on \u002Ftmp\u002Fupdate-full.log\ncheck_lock → active: false                            # confirm\nbegin_change(same task_id)                            # cycle #2 — REQUIRED before more terminal\n... fix work ...\nbegin_change(same task_id)                            # cycle #3 if purged again\n...\ncycle_query(task_id=...)                              # lists ALL pending cycles\nfeedback_accept(id=N1, note=...)                      # score EVERY one\nfeedback_accept(id=N2, note=...)\nfeedback_accept(id=N3, note=...)\nend_change(task_id=...)                               # only now succeeds\n```\n\n## Pitfalls\n\n### Pitfall 1: Redirect capture must happen UNDER the lock\n\n`fleet-update.sh > \u002Ftmp\u002Flog 2>&1` is fine **while the lock is active** (the redirect is the point — it survives the purge). But a `;`-chained command like `fleet-update.sh > log 2>&1; grep ...` can be classified as a write by the enforcer and blocked **before** it runs if the lock was already purged. Pattern to avoid: run the update, then try to grep the log in the same command — the grep half dies.\n\n### Pitfall 2: `| tail -60` truncates the embedded doctor report\n\nThe update's output embeds the full doctor run (475+ lines: 268 pass · 9 warn · 2 fail · 3 info). `tail -60` only shows the summary + REQUIRED ACTIONS, hiding WHICH checks failed. Always redirect to a file and `read_file` the whole thing — you need the per-check ⚠️\u002F❌ lines to fix anything.\n\n### Pitfall 3: Score ALL pending cycles, not just the newest\n\n`end_change(task_id)` rejects with \"no scored cycle\" if ANY cycle for that task is still PENDING. `cycle_query(task_id)` returns them all — iterate and `feedback_accept` each ID before closing. This is the #1 cause of the \"end_change rejected\" confession.\n\n**But a refusal that says the cycle is NOT scored while the ROW reads `MOVE_ON` is a stale\nmodule, not a missing score.** The tell is in the refusal itself: it names the SAME cycle id\nyou just scored, and `cycle_query` or the DB row shows `decision=MOVE_ON` with a non-zero\ncomposite and no `unscored_reason`. The close's scored-cycle precondition reads the store\nthrough the LOADED loop-governance module, and the in-process MCP child holds the revision\nit STARTED with — so a DISAGREEMENT between what the store says and what the close reports\nis a deploy-≠-load failure, and the doctor says so in its own REQUIRED ACTIONS: *\"Restart\nthe gateway to load the new loop-governance module. Until then end_change may read a cycle\nas PENDING right after it was scored — a retry after a cycle_query is the workaround, not\nthe fix.\"* Exits, in order: run the close through the CLI adapter (it imports the module\nfresh on every call, so it reads current code right now), or respawn the MCP child and\nconfirm a NEW pid before trusting the reload. Do NOT re-score the cycle, do not open a\ncarrier cycle, and never `force=True` — all three treat a transport staleness as a store\nproblem and leave the real cause in place. Corollary for diagnosis: the cycle row's\n`timestamp` is its CREATION time (the scoring UPDATE does not touch it), so a timestamp\nthat predates your close attempts proves nothing about when the score landed — compare\n`decision`\u002F`composite`, and keep the number of close attempts you spend on this to one.\n\n### Pitfall 3b: An `end_change` that TIMES OUT is not a verdict — read the store before reacting\n\nThe MCP call carries a 300 s client timeout, and a close that runs the self-adversarial review\ncan exceed it. The timeout is client-side only: the scoring you did beforehand may already be in\nthe store, the review may still be running, and the lock may still be held — so `TimeoutError`\ntells you NOTHING about the outcome. Read both before reacting: `cycle_query(task_id=...)` for the\ncycle's `decision`\u002F`composite`, and `check_lock` for the lock. Measured: after a timeout the cycle\nrow already read `MOVE_ON` with its composite recorded while the lock was still live and stamped\n`executing`; re-issuing `end_change` then returned the review's ACTUAL verdict (findings), which\nthe timeout had swallowed. So do not re-score, do not open a carrier cycle, and do not treat the\ntimeout as a refusal or as a success — re-issue `end_change` once and read the verdict it returns.\n\n### Pitfall 4: Doctor remediation hints may not match the real CLI\n\nThe doctor's REQUIRED ACTIONS print commands like `Check: hermes cron logs --name agent-...` — but `logs` is NOT a valid `hermes cron` subcommand and `runs` rejects `--name`. Valid subcommands: `list, create, add, edit, pause, resume, run, remove, rm, delete, status, runs, history, tick`. Pass the cron name **positionally** (`hermes cron runs \u003Cname>`), no `--name` flag. Don't burn cycles re-trying the doctor's literal suggestion.\n\n### Pitfall 5: The survey gate fires on ANY `.py` write, even throwaway\n\nWriting `\u002Ftmp\u002Finspect.py` triggers the domain-skill gate: \"write blocked until `test-driven-development` loaded\". Loading it satisfies the gate — it does NOT obligate a TDD cycle for a disposable inspection script (TDD's own exceptions cover throwaway prototypes). State this explicitly (\"gate satisfied — disposable script, no test cycle\") so the user isn't confused about why TDD was loaded.\n\n## Guarantees (2026-10-02) — the unlock can no longer outlive the run\n\nThe deploy unlocks each immutable enforcement file before overwriting it. Two\nguarantees make a leftover unlocked state self-correcting:\n\n1. **Relock on error.** `fleet-update.sh` installs `_relock_enforcement` as an\n   `EXIT` trap — and `fleet-dogfood.sh` has its own, so the mandated pre-push\n   gate does not depend on a CHILD script's trap for a security property. The\n   relock runs on success, on error and on signal alike; a FAILED deploy no\n   longer leaves the gate tamperable. Verified by failing a deploy on purpose\n   (bad `FLEET_DEPLOY_HOME` → rc=1) and watching all nine files come back\n   `----i---------e-------`.\n2. **Relock after inactivity.** `agent-remediate-apply.py` (no_agent, every\n   10 min) self-heals at the top of every cycle, probing\n   `hermes-plugin-lock status` FIRST so the already-locked case costs one\n   `lsattr` and no sudo. `fleet_doctor --fix` relocks on a failing\n   `Immutable:` check as well.\n\nConsequences for an agent who finds a missing `i` flag: it is a **symptom, not a\ntask**. Wait one cycle, or run `sudo -n hermes-plugin-lock lock`. Do NOT hand-lock\nindividual files, and never \"fix\" it by weakening the check.\n\n### Pitfall 6: A cycle whose remaining deliverable is blocked by a THIRD PARTY has no sanctioned exit\n\nThe close gate scores complexity over the lock window and refuses to release the lock while a\nsufficiently complex change is unclosed. That is correct when the work is incomplete — but when the\nONLY thing left is something you are forbidden to do (merge over another session's uncommitted\nfiles, edit a generated security artifact, or produce an authorization record that lives in the\noperator's own chat), the gate refuses forever, and each `rereview_change` is a fresh sampling call\nthat returns new findings rather than closure. Two rules follow:\n\n- **Do not re-roll the reviewer.** Once a finding's remedy is impossible or contradicts the\n  operator's explicit instruction, state that once with the evidence and stop: repeated re-reviews\n  burn tokens and add findings without changing the blocker.\n- **Record the blocker instead of forcing a close.** `record_issue` keeps it tracked (give it a\n  blocker\u002Fobstacle category); the work already committed and deployed stays landed. Never reach for\n  a force or replace-lock route to escape it — an override is the operator's call, and asking is\n  cheap.\n- **Know how the lock actually clears: the TTL, not you — and only once you STOP WORKING.** A lock\n  ages out an hour after its last heartbeat, and ANY write-class tool call refreshes that heartbeat\n  (`_touch_heartbeat` runs on writes), not just `check_lock`. So \"wait out the TTL\" is not available\n  to the session still holding the lock: while it keeps working the lock never goes stale, and the\n  wait the docs suggest can never arrive. Reach for a terminal state (Pitfall 8) instead of waiting. A scored (non-PENDING) cycle left this\n  way is clean: the doctor's leak check does not fire. But no push receipt was written, so whoever\n  performs the push must run its own close to write one. A held lock does not stop a second session\n  acquiring its own, so the deferred work can proceed while yours waits.\n\n### Pitfall 7: \"No sanctioned exit\" is a claim to TEST, not a conclusion to trust\n\nBefore declaring a cycle unrecoverable, enumerate the tools that exist — the answer is often that the\ntool was there all along and a wrong assumption hid it. Verified 2026-10-10, one session — the four\nclaims below are asserted by the committed, re-runnable test\n`tests\u002Ftest_governance_lock_lifecycle_claims.py` (transcript:\n`docs\u002Fevidence\u002Fgovernance-lock-lifecycle-claims\u002Ftranscript.txt`), which drives the deployed\n`loop-gov-mcp.py` directly:\n\n- **`advance_task_state` is also the recovery for a lock stranded by a CRASHED close.** A close that raises after `feedback_accept` leaves the cycle scored-but-PENDING with the lock still held, and a repeated `end_change` throws again rather than clearing it. A terminal transition (`new_state=\"cancelled\"`) releases it — the tool reports \"a terminal task holds nothing\" — and records the reason in `task_events`. Use that instead of a force\u002Foverride, and say plainly in the reason what crashed, because the range then has no receipt and the next close must mint one.\n- **`advance_task_state` retires a mis-framed cycle without an override.** The user asked how to clear\n  a cycle that kept being refused for scope drift. Reading the tool list settled it in minutes: the\n  state machine carries `cancelled`\u002F`suspended` and logs the reason in `task_events`, so the mis-framed\n  task was retired through it (no `force`, no `user_overrode`) and the real work reopened under a\n  correctly-named cycle, which closed CLEAN first try. A \"no exit\" assumption had already cost four\n  refusals and an hour-long TTL wait.\n- **Read the lock's FULL picture; `active` alone is only YOUR lock.** A call with no args cannot\n  resolve a session, so `active` reports `false` while another session's lock is live on disk — that\n  field answers \"do *I* hold a lock\", never \"is any lock held\". The call also returns `locks` +\n  `live_lock_count` listing every live lock (task, session, agent, repo, heartbeat): read those before\n  concluding none exists, and when the lock FILE says active while `active` says false, **the file is\n  right** — the close will succeed. Do not re-acquire and do not open a carrier cycle; that false\n  negative manufactures the very extra cycle you were trying to avoid.\n- **The lock's repo identity is legible in `repo_path`.** A lock stamped from a git repo carries a\n  NON-EMPTY `repo_path`; one opened where the cwd is NOT a repo (a plain working copy, a deploy dir)\n  has nothing stamped, so it inherits the host-canonical slug with `repo_path` EMPTY. Two locks can\n  name the same slug by opposite routes — read `repo_path` to tell them apart, and treat an empty one\n  as \"this lock does not govern the tree I worked in\": the close gate composes review material from\n  the named repo, so a mis-tagged lock gets reviewed against a tree that cannot contain the work.\n  `loop-gov.py` prints a note naming the cwd and the repo it will claim when it cannot resolve one;\n  run governance from inside the repo, or pass `--repo \u003Cpath>`, rather than accepting the fallback.\n- **`request_interruption` cannot rename a cycle** — it derives the sub-task id by suffixing the\n  parent's, so splitting work with it does not fix a mismatched task id. Renaming needs a NEW\n  `begin_change` under the correct name (a `reframe_change` tool would be the clean fix; until it\n  exists, retire-and-reopen is the sanctioned path).\n- **Order matters: do not `cancel` before interrupting.** `request_interruption` refuses a task already\n  in a terminal state, so a cancel-then-interrupt sequence wedges. Interrupt (or reopen) first; check\n  `TERMINAL_STATES` before sequencing any state transition.\n- **The TTL expiry is a real, usable exit.** After a lock expires, `begin_change` under the\n  correctly-named task opens a fresh cycle. Waiting out the TTL is preferable to forcing a close on a\n  mis-framed one.\n\nGeneral rule: when a gate refuses in a way that looks unbounded, the first move is to re-read the\navailable tools and their parameters — not to re-roll the reviewer, and never to override.\n\n### Pitfall 8: A lock minted WITHOUT repo identity cannot be closed — only a TERMINAL state clears it\n\n`end_change` refuses such a cycle with \"Cannot close: no governed repo to measure complexity — the\nself-adversarial review cannot run\", because the close composes its review material from the repo the\nlock names and this lock names none. Nothing ages it out (Pitfall 6: the owner's own work keeps it\nalive), so the lock outlives every retry. Releases:\n\n- **`advance_task_state(task_id=..., new_state=\"cancelled\", reason=...)`** — terminal, and it reports\n  \"a terminal task holds nothing\" because `_release_lock` does not consult repo identity. Name the\n  cause in the reason; the range is left without a receipt, so whoever pushes must close something.\n- **`blocked` is NOT a release.** It is non-terminal, so it keeps holding the lock — parking a lock\n  you cannot close with `blocked` is what turns a stuck cycle into a stuck repo. From `blocked` the\n  way out is `cancelled` (or `planning`).\n- **A zero-diff placeholder cycle is closed by SCORING it.** `feedback_accept` with an\n  `unscored_reason` takes it PENDING → MOVE_ON; \"it can never close\" is true of `end_change` only, and\n  the remaining work is just the lock release above.\n- **A different session cannot release it.** Locks are session-scoped, so a later session cannot\n  end_change or advance the lock a dead session left; only the TTL purge (or the operator's `rm` of\n  the file) clears it. Say so rather than leaving the next agent hunting for a tool.\n\nDiagnose before concluding: read the lock FILE and check `repo_path` \u002F `repo_slug`; empty or absent\nidentifies this class in one read.\n\nMint sites: any writer that builds a FRESH lock state instead of re-writing one that already carries\nthe repo. Re-writers inherit the repo fields, so all 14 other lock-write call sites are unaffected —\nand when you fix one fresh-state writer, pin it with a test asserting the state it hands to the writer\ncarries `repo_path` AND `repo_slug`. Such a lock also creates no claimable task row, so a promotion\nthat mints one leaves a lock, a cycle and an event but nothing to claim.\n\n**Which refusals free you — and why a freed lock must come with a resolved cycle.** A refusal about\nthe LOCK'S METADATA (the lock names no repo, or names a repo this session is not working in) judged\nnothing: no diff was read, no verdict exists, and **no receipt is written on that path**, so holding\nthe lock authorises nothing while dead-ending the session that holds it — and the sessions queued\nbehind it. Current builds RELEASE the lock on those refusals and close the cycle UNSCORED\n(`MOVE_ON` plus a reason naming the refusal), which makes the terminal-state route above the path\nfor a lock left by an older build or a crashed close rather than the only way out. A verdict about\nthe WORK (findings, reviewer unavailable) is different in kind: the close is refused and the lock is\nreleased so you are not trapped, but the range still needs a CLEAN receipt before it can be pushed —\nso re-check the receipt, do not re-close to \"clear\" it.\n\nAny change that frees a lock must resolve its cycle in the same step. The doctor counts a PENDING\ncycle as EXPECTED while a live lock exists and as a leak FAIL the moment the lock is gone, and ANY\ndoctor FAIL blocks the push for every agent on the host — so releasing alone converts one session's\ndead-end into a host-wide block. Before \"recovering\" a cycle you believe is PENDING, read what the\nscore reports: `MOVE_ON → MOVE_ON` means something already resolved it, so your scoring was a no-op\nrather than the fix, and the remaining problem is elsewhere.\n\n**There are TWO lock-removers, and each needs its own audit.** The MCP releases locks on refusals;\nthe standalone `purge-stale-governance-locks.py` (run by every deploy and by a cron) unlinks stale\nfiles. Fixing one does not fix the class — grep both files for every site that unlinks a lock or\nmakes a task terminal, and check each against the invariant above. The sweep also had a SECOND\ndivergence: its staleness rule was TTL-only, with none of the liveness rescue the MCP predicate\ngained, so it would happily remove a *busy* session's lock (heartbeat frozen through hours of\nediting, no governed call) and that session's next write was refused — the deadlock the rescue exists\nto remove. **A second copy of a predicate is a second rule**: when you touch either path, compare the\nPREDICATE (not just the removal) against the fleet's, and pin the comparison with a test.\n\n### Removing a lock and resolving its cycle are ONE step — and two details of the ORDER trap you\n\n- **Resolve the cycle BEFORE unlinking the file.** A crash between the two must leave a DEAD lock\n  beside a `MOVE_ON` cycle (harmless, and the next sweep removes the file) and never a lockless\n  PENDING cycle, which blocks every push on the host with no owner left to clear it.\n- **Close through the PER-TASK closer, never through an orphan-cycle resolver.** The resolver's own\n  precondition is \"this task holds no live lock\", and at the moment you are about to unlink, the file\n  is still on disk — so routing the close through it closes NOTHING and the leak you set out to\n  remove survives, while the code reads as if it did the work. Prove it with a probe on a throwaway\n  state dir; do not accept the call site by inspection.\n- **A cycle whose work was CANCELLED is closed with no score invented.** `feedback_override`\n  (→ `MOVE_ON`) records that nothing landed; scoring it would claim work that does not exist. Then\n  `end_change` — if the lock is already released it answers \"nothing to release\", which is fine.\n- **The cheapest leak check is the gate itself:** `begin_change` REFUSES while an unscored PENDING\n  cycle exists and NAMES it, so a successful `begin_change` is proof the host is clear and a refusal\n  is proof it is not. `cycle_query` names them directly.\n- **When a release path is added, add it to the sweep test's enumeration.** A class-level rule\n  (\"every site that drops a lock also resolves its cycle\") is held by a test that FAILS on any NEW\n  call site which omits the paired action, with each exemption declared and its justifying gate\n  asserted against the source.\n\n### The sweep's disposition differs from the MCP's ON PURPOSE — do not \"unify\" them\n\nWhen the cycle cannot be resolved, the MCP still releases the lock and the sweep KEEPS it. Both are\nright, and the reason is what each caller's alternative costs:\n\n- **MCP release paths release anyway** — a live session must never be dead-ended by a broken store\n  (no release, no path forward, `force=True` the only exit was the original bug). The leak this can\n  leave is repaired by the resolver, by `reclaim_dead_locks`, or by the >24h auto-resolve.\n- **The unattended sweep keeps the lock** — nothing is waiting on it, so a stale file on disk costs\n  nothing while the lockless PENDING cycle it would create blocks every push on the host. It\n  escalates instead: exit code 2 with an `OPERATOR ACTION` line, never a silent `kept`.\n- **A permanently failing fail-closed path needs an exit code, not a log line.** Silence on a broken\n  store is how a repairable host becomes permanent: a cron that always exits 0 turns a dead DB into\n  background noise. Give the could-not-do-my-job outcome its own non-zero code and say who must act.\n- **A lock file that is unparseable AND well past the TTL is corruption, not a mid-write race.**\n  The mid-write guard (never delete an unparseable file) is right, but a file in that state for\n  hours can never be aged, so it and any cycle behind it sit forever. COLLECT those and report them\n  for cleanup rather than skipping them silently every run.\n\n### Minting a lock is the MIRROR of removing one — the cycle must exist FIRST\n\nThe removal rule (\"removing a lock and resolving its cycle are ONE step\") has a twin that is easier to\nmiss because it lives on the happy path: **a lock is only ever written AFTER the cycle it names exists\nin the store.** Get the order wrong and the failure is the worst kind — the operation reports SUCCESS\nwhile leaving a live lock whose task has no scorable cycle, which is unclosable, unfreeable by\n`begin_change`, and escapable only by an override.\n\n- **Create the cycle first, then write the lock; REFUSE the operation if the create fails.** A refusal\n  is recoverable in seconds; a lock with no cycle costs the session and everything queued behind it.\n- **Never let the cycle create fail SILENTLY.** An inline `INSERT INTO loop_cycles` inside a\n  `try\u002Fexcept` whose fallback is a note like \"(note: no cycle record — DB unavailable)\" is the bug: on a\n  transient DB error the caller gets a lock AND a success message. The create must raise into a refusal.\n- **A second copy of the CREATE is a second rule.** Hunting the class means grepping every lock-writing\n  path for its OWN inline cycle insert — fixing one writer leaves the identical ordering bug in a sibling\n  tool (an ISSUE-PROMOTION path is the classic second copy, because it builds a fresh task outside the\n  normal `begin_change` flow). Prefer ONE shared `_create_pending_cycle(task_id, session_id, outcome)`\n  helper called by every mint site; two implementations drift.\n- **Pin the invariant per mint site, not once for the file.** The test should assert the cycle-create\n  call appears BEFORE the lock write in EACH function that mints, so a NEW call site that omits it fails\n  the suite. A class-level rule held by one site's test protects one site.\n\nThe tell, for diagnosis in the field: `end_change` answers **\"no governance cycle found for this task\"**\nwhile `begin_change` answers **\"a governance session is already active … use force=True\"**. Both messages\nare correct about different stores — the LOCK exists, the CYCLE does not — and that pair is the signature\nof this class, not a scoring problem. Re-score nothing; check whether the lock's task has a cycle row at\nall, then free the lock (a terminal transition) and fix the ordering in the code that minted it.\n\n### A session that resolves NO repo is UNGOVERNED, not lock-blocked — say so, and make recovery one step\n\nGovernance is REPO-SCOPED: a lock binds to a repo, so a call that resolves no repo cannot be\nauthorised by ANY lock. When the gate refuses such a call by telling the agent to \"acquire a lock\",\nthat is an impossible demand, and it becomes a LOCKOUT: the agent cannot mint the lock, and it cannot\nrun the compound it needs to find the checkout, because a compound is write-class. Read-only\nprimitives stay free, so orienting is still possible — the failure is the refusal's framing, not the\nrule.\n\n- **Resolve the repo from the SESSION, not only from the call's arguments.** A command like\n  `git commit -m …` carries no path of its own, so path-argument resolution returns nothing and the\n  call falls through to slug matching alone. Fall back to the repo the session already recorded from\n  an earlier call's arguments — the same repo it has been working in, not a new permission — before\n  concluding there is none.\n- **With no repo, refuse in its OWN words.** Say that governance is repo-scoped so no lock could\n  authorise the call, then name the escapes that actually work: pass the repo on the call\n  (`workdir=\u003Cpath>`), make the command's own path point inside the checkout, or `begin_change` while\n  working in it. Add that read-only commands never need a lock, so they can be used to find the\n  checkout. A generic \"this repo requires an active governance lock\" when there IS no repo makes a\ndead end look like policy — and the agent loops on the same blocked command.\n- **A gate\u002Fplugin fix is not live until the process that LOADS it restarts.** Handing a fleet fix\n  over means naming BOTH steps for the affected host: update (pull the file) and restart (load it).\n  A corrected enforcer on disk changes nothing in a running gateway, and the host stays blocked while\neverything looks fixed.\n\n### Pitfall 9: begin_change SUCCEEDS yet every write still deadlocks — the injection is tool-PREFIX-bound\n\nThe enforcer stamps session_id + repo_path into governance MCP args by matching the TOOL NAME\nprefix (`tool_name.startswith(\"mcp__\u003Cname>__\")`, two matcher sites). Renaming the review MCP\nserver (or any server the enforcer injects into) without updating those matchers silences the\ninjection: the server falls back to its own derivation (env\u002Fper-repo file) and mints locks under a\ndifferent id than the enforcer expects. Signature: a fresh `begin_change` reports success and a lock\nFILE exists, yet every write-class tool still refuses with GOVERNANCE LOCK REQUIRED. Diagnose by\ncomparing `~\u002F.steadfaste-fleet\u002Fstate\u002F.hermes-session-current.id` (the enforcer's canonical id) with\nthe lock file the fresh begin_change just wrote — different ids, and the enforcer can never see\nthat lock. The CLI with an explicit session_id is the recovery: drive\n`python3 ops\u002Fscripts\u002Floop-gov.py begin_change '{\"session_id\": \"\u003Cid from .hermes-session-current.id>\", …}'`\nthrough a composite tool the gate does not hook (terminal itself is refused — the gate is the\nbroken thing), then fix the real defect: add the new prefix to both matchers, pin RED→GREEN with\na test driving `_inject_session_context` under the new name, deploy, reload\u002Frestart; retire any\nlock minted under the derived id with `advance_task_state new_state=cancelled`. Full recipe:\n`rename-sweep` → `references\u002Fmcp-server-name-rename.md`.\n\n### Pitfall 10: A session's governance identity can FREEZE onto the wrong repo — the exit is a FRESH session\n\nGovernance is SESSION-scoped. The session id arrives from the Hermes conversation\n(`kwargs['session_id']`, README \"Session ID Handoff Architecture\") and the governed repo\nis resolved from that session together with the call's cwd\u002Fargs. A session that once\nresolved the WRONG repo can therefore re-tag that same wrong repo on every later\n`begin_change` — so the failure is whole-session, not one bad call: the lock's\n`repo_path`\u002F`repo_slug` name a tree that is not yours, the agent identity can read\n`unknown`, and work in the correct repo keeps being governed against the wrong one.\n\n- **Try the sanctioned escapes first**: run governance from inside your checkout, or\n  pass a `workdir` \u002F `--repo \u003Cpath>` that points into it, so the call resolves the right\n  repo on its own terms before you conclude the session is stuck.\n- **A restart is NOT a remedy.** The identity is keyed to the conversation session, not\n  to the process, so restarting the gateway or the host does not clear it. Do not burn\n  cycles re-running `begin_change` or rebooting, expecting a different tag.\n- **The reliable exit is a NEW conversation (`\u002Fnew`).** A fresh session mints a clean\n  session id and re-resolves the repo from scratch. Before you leave, record the frozen\n  session's state — SHAs, and anything left STAGED (a staged change survives in the\n  index and the next session can commit it) — so the follow-on session finishes the work\n  instead of rediscovering it.\n\n### Pitfall 11: The `loop-gov daemon` doctor WARN re-fires after EVERY fleet-update — only a gateway restart clears it\n\nThe doctor's `loop-gov daemon` check verifies the running loop-gov MCP\ndaemons by CONTENT: each daemon records a stamp\n(`~\u002F.steadfaste-fleet\u002Fstate\u002Floop-gov-daemon.json`) that holds ONE pid plus\nthe sha256 of the module it loaded. Two daemons run (review and\nloop-governance roles) but only the last one to start owns the stamp slot\n— the other daemon can never be content-verified and falls back to\nmtime-vs-start comparison. `fleet-update.sh` force-rewrites every mapped\nfile, so `loop-gov-mcp.py`'s mtime advances past both daemons' start even\nwhen the bytes are byte-identical — after EVERY deploy the unstamped\ndaemon reads \"COULD NOT VERIFY by content\" and the WARN re-fires no matter\nhow recently the gateway restarted. The check only passes while the module\nmtime predates the daemon start, i.e. after a gateway restart that follows\nthe last deploy. So: read the WARN as a deploy artifact, not stale code;\nclear it with `hermes gateway restart` after the final deploy; and never\nhand-edit or fabricate the stamp file — the check is only meaningful if\nthe daemon itself wrote it. Root cause is the single-slot stamp: the\ndurable fix is a per-pid stamp map so every daemon is verified by content\nand the byte-identical rewrite stops re-warning.\n\n### A wide close judges a WAVE of blobs per pass — concurrency, never a longer window\n\nA close refused with **\"N blob(s) of the push range still carry no review verdict\"** names the exact\nremaining files. The per-blob pass now issues a **wave** of `BLOB_REVIEW_CONCURRENCY` (4) reviewer\ncalls CONCURRENTLY, and because elapsed time is the SLOWEST call rather than their sum, four calls of\n180–220 s land inside the same ~240 s window. Measured: a four-file change closes in ONE pass, and a\n15-file range in four round trips where it previously took fifteen. Verdicts are keyed by blob\nCONTENT, so each pass resumes from where the last stopped instead of redoing judged work. Re-issue\n`end_change` until it reports the session closed — the counter must decrease (by up to the wave\nsize), and a repeat that does NOT decrease is the real signal something is wrong. Do not read the\nrepetition as a broken loop, and do not widen the review range to shorten it.\n\n**A blob judged NOT clean must CHANGE content — re-issuing on identical bytes returns nothing.**\nThe close reads \"no blob was SENT this pass ... re-reviewing identical bytes cannot produce a\ndifferent verdict\". That is the save-and-stop signal, not a hang: fix the file so it is a NEW blob,\ncommit the fix (a partial `git commit -m msg -- \u003Cpaths>` — the shared-index hook refuses an\nun-scoped bare commit), then re-issue `end_change`. The committed fix is judged on its own and the\nclose continues from there. Do NOT re-roll the reviewer on unchanged material and do NOT open a\ncarrier cycle — neither produces a different verdict.\n\n**A reviewer finding on a TEST is often a real lesson: fix the test, not the production code.** The\ntell is a meaningful finding that names exact lines in the test file (e.g. a test mutates\n`os.environ` without restoring it). The fix is the test using the fixture (`monkeypatch.setenv`,\nwhich restores in a finally regardless of assertion outcome) — shipped as its own small commit, so\nit is a new blob for the close. A dependent-classes finding (\"the function is in the sibling file\")\nmay be a false positive the reviewer itself tells you to downgrade to info-level — read the\nfinding's own recommendation before treating it as a blocker.\n\n**Do NOT raise the MCP client ceiling to shorten it.** This skill used to call that \"the lever that\nactually shortens it\", and that is wrong twice over: the operator's standing requirement is that\nreviews stay under 300 s — the module records it verbatim, \"the window is never raised\" — and it\nwould not have helped anyway, because a sequential pass already spent its whole window on ONE call.\nConcurrency is what fits several blobs per round trip, with the same reviewer, the same prompt and\nthe same verdict. Raising a THRESHOLD (blobs per window, the wide-diff split line count) buys passes\nby reviewing less and is a governance reduction.\nMore per call, never less per blob.\n\n### Judging a lock dead\n\nThe predicate is \"heartbeat past the lock's own TTL **AND** no evidence the agent is working\". Three\nrules make the second half safe, and all three are load-bearing:\n\n- **Scope the liveness evidence by AUTHOR, not by repo.** A commit authored by the lock's own agent\n  counts; a peer's commit in the same repo does not (that would only delay the peer's own takeover,\n  which is the deadlock again). Scoping by repo ALONE is the trap: a session doing a long stretch in\n  a DIFFERENT checkout authors nothing in the lock's repo, so it gets judged dead while it is holding\n  the lock right now. Look across the candidate repos under HOME for that author.\n- **The widening is safe only because the renewal budget bounds it** (`LIVENESS_MAX_RENEWALS`) — do\n  not report the widening as harmless on its own. The budget is PER ACQUISITION, which is a dependency\n  you must verify, not assume: a new acquisition builds a FRESH lock state, so the counter starts at\n  0. If a release\u002Fre-acquire cycle left the counter at its ceiling, the bound would be a one-time\n  gate instead of a per-session limit.\n- **Authorship is not identity.** A cron or daemon committing AS that agent (or `--author=`) is\n  indistinguishable from the session and reads as proof of life. The failure mode is a lock kept\n  alive for a session that is gone, bounded to ONE renewal past the TTL — say that trade-off in the\n  docstring rather than claiming the check is sound, and name the stronger signal you would want\n  (a per-session token the enforcer injects, which cannot be forged like a git author).\n\n### Testing governance helpers\n\n- **Never drive an entry point whose PRECONDITIONS consult live state to assert one branch.**\n  `begin_change` runs the dogfood check and the unscored-PENDING-cycle check before the refusal you\n  want to test, so the assertion ends up measuring the host (a dirty tree or an open cycle fails a\n  message test). Extract the decision\u002Fmessage into its own function and drive that — and assert BOTH\n  directions: the repo-less lock gets the terminal-state guidance, a normal lock still gets the\n  ordinary \"call end_change\".\n- **Write lock fixtures with the module's OWN writer** (`_write_lock(state, {\"session_id\": sid})`),\n  never a hand-built path: the path helper need not share the global you swapped, so the entry point\n  starts a NEW session and the test passes while measuring the wrong subject.\n\n## Verification\n\n- `check_lock` confirms the purge (active: false) — expect this after every update run\n- `cycle_query` shows no PENDING cycles before `end_change`\n- `end_change` returns success (no rejection)\n- Doctor overall line eventually shows the reduced warn\u002Ffail counts\n\n\n## Related (user-owned, may need `hermes curator adopt`)\n\n- `fleet-deployment-sync` — deploy mechanics, invocation forms, immutable-file pitfalls\n- `fleet-preflight` — pre-flight checks + fleet-update side-effect table\n- `loop-governance` — scoring internals, lock-lifecycle race history\n","# Governance Lock Lifecycle During Deploy Operations\n\n**Class of task:** any session that runs `fleet-update.sh` (or any deploy that triggers `purge-stale-governance-locks.py`), then hits `GOVERNANCE LOCK REQUIRED` on a subsequent tool call, or finds `end_change` rejecting with \"no scored cycle\". Also covers the \"pull latest → update → doctor → fix\" loop.\n\n## The Core Mechanic\n\n`fleet-update.sh` runs `purge-stale-governance-locks.py` at the **END of EVERY run** — it removes **every** `.governance-*.json` lock file, **including your active session's lock**. This is by design (Pitfall 4 in `fleet-deployment-sync`), but the blast radius is bigger than most agents expect:\n\n1. **ALL terminal is gated, not just writes.** The enforcer's `GOVERNANCE LOCK REQUIRED` fires on ANY `terminal()` call without an active lock — even a read-only `grep` of the update log. `ls`, `grep`, `cat`, `git status` all blocked until you re-acquire.\n2. **`read_file` \u002F `search_files` \u002F `skill_view` are NOT gated.** These are the escape hatch for inspecting output between the purge and your re-acquire.\n3. **Each re-acquire creates a NEW pending cycle** under the same `task_id`. Two re-acquires → three pending cycles total (original + 2). All must be scored before `end_change()` or it rejects.\n\n## The Working Sequence (verified 2026-08-03)\n\n```text\nbegin_change(task_id=\"pull-latest-fleet-update\")     # cycle #1\ngit pull --rebase --autostash origin main\nfleet-update.sh > \u002Ftmp\u002Fupdate-full.log 2>&1          # redirect UNDER the lock\n                                                      #   ← purge fires, lock GONE\n# terminal() now blocked — use read_file on \u002Ftmp\u002Fupdate-full.log\ncheck_lock → active: false                            # confirm\nbegin_change(same task_id)                            # cycle #2 — REQUIRED before more terminal\n... fix work ...\nbegin_change(same task_id)                            # cycle #3 if purged again\n...\ncycle_query(task_id=...)                              # lists ALL pending cycles\nfeedback_accept(id=N1, note=...)                      # score EVERY one\nfeedback_accept(id=N2, note=...)\nfeedback_accept(id=N3, note=...)\nend_change(task_id=...)                               # only now succeeds\n```\n\n## Pitfalls\n\n### Pitfall 1: Redirect capture must happen UNDER the lock\n\n`fleet-update.sh > \u002Ftmp\u002Flog 2>&1` is fine **while the lock is active** (the redirect is the point — it survives the purge). But a `;`-chained command like `fleet-update.sh > log 2>&1; grep ...` can be classified as a write by the enforcer and blocked **before** it runs if the lock was already purged. Pattern to avoid: run the update, then try to grep the log in the same command — the grep half dies.\n\n### Pitfall 2: `| tail -60` truncates the embedded doctor report\n\nThe update's output embeds the full doctor run (475+ lines: 268 pass · 9 warn · 2 fail · 3 info). `tail -60` only shows the summary + REQUIRED ACTIONS, hiding WHICH checks failed. Always redirect to a file and `read_file` the whole thing — you need the per-check ⚠️\u002F❌ lines to fix anything.\n\n### Pitfall 3: Score ALL pending cycles, not just the newest\n\n`end_change(task_id)` rejects with \"no scored cycle\" if ANY cycle for that task is still PENDING. `cycle_query(task_id)` returns them all — iterate and `feedback_accept` each ID before closing. This is the #1 cause of the \"end_change rejected\" confession.\n\n**But a refusal that says the cycle is NOT scored while the ROW reads `MOVE_ON` is a stale\nmodule, not a missing score.** The tell is in the refusal itself: it names the SAME cycle id\nyou just scored, and `cycle_query` or the DB row shows `decision=MOVE_ON` with a non-zero\ncomposite and no `unscored_reason`. The close's scored-cycle precondition reads the store\nthrough the LOADED loop-governance module, and the in-process MCP child holds the revision\nit STARTED with — so a DISAGREEMENT between what the store says and what the close reports\nis a deploy-≠-load failure, and the doctor says so in its own REQUIRED ACTIONS: *\"Restart\nthe gateway to load the new loop-governance module. Until then end_change may read a cycle\nas PENDING right after it was scored — a retry after a cycle_query is the workaround, not\nthe fix.\"* Exits, in order: run the close through the CLI adapter (it imports the module\nfresh on every call, so it reads current code right now), or respawn the MCP child and\nconfirm a NEW pid before trusting the reload. Do NOT re-score the cycle, do not open a\ncarrier cycle, and never `force=True` — all three treat a transport staleness as a store\nproblem and leave the real cause in place. Corollary for diagnosis: the cycle row's\n`timestamp` is its CREATION time (the scoring UPDATE does not touch it), so a timestamp\nthat predates your close attempts proves nothing about when the score landed — compare\n`decision`\u002F`composite`, and keep the number of close attempts you spend on this to one.\n\n### Pitfall 3b: An `end_change` that TIMES OUT is not a verdict — read the store before reacting\n\nThe MCP call carries a 300 s client timeout, and a close that runs the self-adversarial review\ncan exceed it. The timeout is client-side only: the scoring you did beforehand may already be in\nthe store, the review may still be running, and the lock may still be held — so `TimeoutError`\ntells you NOTHING about the outcome. Read both before reacting: `cycle_query(task_id=...)` for the\ncycle's `decision`\u002F`composite`, and `check_lock` for the lock. Measured: after a timeout the cycle\nrow already read `MOVE_ON` with its composite recorded while the lock was still live and stamped\n`executing`; re-issuing `end_change` then returned the review's ACTUAL verdict (findings), which\nthe timeout had swallowed. So do not re-score, do not open a carrier cycle, and do not treat the\ntimeout as a refusal or as a success — re-issue `end_change` once and read the verdict it returns.\n\n### Pitfall 4: Doctor remediation hints may not match the real CLI\n\nThe doctor's REQUIRED ACTIONS print commands like `Check: hermes cron logs --name agent-...` — but `logs` is NOT a valid `hermes cron` subcommand and `runs` rejects `--name`. Valid subcommands: `list, create, add, edit, pause, resume, run, remove, rm, delete, status, runs, history, tick`. Pass the cron name **positionally** (`hermes cron runs \u003Cname>`), no `--name` flag. Don't burn cycles re-trying the doctor's literal suggestion.\n\n### Pitfall 5: The survey gate fires on ANY `.py` write, even throwaway\n\nWriting `\u002Ftmp\u002Finspect.py` triggers the domain-skill gate: \"write blocked until `test-driven-development` loaded\". Loading it satisfies the gate — it does NOT obligate a TDD cycle for a disposable inspection script (TDD's own exceptions cover throwaway prototypes). State this explicitly (\"gate satisfied — disposable script, no test cycle\") so the user isn't confused about why TDD was loaded.\n\n## Guarantees (2026-10-02) — the unlock can no longer outlive the run\n\nThe deploy unlocks each immutable enforcement file before overwriting it. Two\nguarantees make a leftover unlocked state self-correcting:\n\n1. **Relock on error.** `fleet-update.sh` installs `_relock_enforcement` as an\n   `EXIT` trap — and `fleet-dogfood.sh` has its own, so the mandated pre-push\n   gate does not depend on a CHILD script's trap for a security property. The\n   relock runs on success, on error and on signal alike; a FAILED deploy no\n   longer leaves the gate tamperable. Verified by failing a deploy on purpose\n   (bad `FLEET_DEPLOY_HOME` → rc=1) and watching all nine files come back\n   `----i---------e-------`.\n2. **Relock after inactivity.** `agent-remediate-apply.py` (no_agent, every\n   10 min) self-heals at the top of every cycle, probing\n   `hermes-plugin-lock status` FIRST so the already-locked case costs one\n   `lsattr` and no sudo. `fleet_doctor --fix` relocks on a failing\n   `Immutable:` check as well.\n\nConsequences for an agent who finds a missing `i` flag: it is a **symptom, not a\ntask**. Wait one cycle, or run `sudo -n hermes-plugin-lock lock`. Do NOT hand-lock\nindividual files, and never \"fix\" it by weakening the check.\n\n### Pitfall 6: A cycle whose remaining deliverable is blocked by a THIRD PARTY has no sanctioned exit\n\nThe close gate scores complexity over the lock window and refuses to release the lock while a\nsufficiently complex change is unclosed. That is correct when the work is incomplete — but when the\nONLY thing left is something you are forbidden to do (merge over another session's uncommitted\nfiles, edit a generated security artifact, or produce an authorization record that lives in the\noperator's own chat), the gate refuses forever, and each `rereview_change` is a fresh sampling call\nthat returns new findings rather than closure. Two rules follow:\n\n- **Do not re-roll the reviewer.** Once a finding's remedy is impossible or contradicts the\n  operator's explicit instruction, state that once with the evidence and stop: repeated re-reviews\n  burn tokens and add findings without changing the blocker.\n- **Record the blocker instead of forcing a close.** `record_issue` keeps it tracked (give it a\n  blocker\u002Fobstacle category); the work already committed and deployed stays landed. Never reach for\n  a force or replace-lock route to escape it — an override is the operator's call, and asking is\n  cheap.\n- **Know how the lock actually clears: the TTL, not you — and only once you STOP WORKING.** A lock\n  ages out an hour after its last heartbeat, and ANY write-class tool call refreshes that heartbeat\n  (`_touch_heartbeat` runs on writes), not just `check_lock`. So \"wait out the TTL\" is not available\n  to the session still holding the lock: while it keeps working the lock never goes stale, and the\n  wait the docs suggest can never arrive. Reach for a terminal state (Pitfall 8) instead of waiting. A scored (non-PENDING) cycle left this\n  way is clean: the doctor's leak check does not fire. But no push receipt was written, so whoever\n  performs the push must run its own close to write one. A held lock does not stop a second session\n  acquiring its own, so the deferred work can proceed while yours waits.\n\n### Pitfall 7: \"No sanctioned exit\" is a claim to TEST, not a conclusion to trust\n\nBefore declaring a cycle unrecoverable, enumerate the tools that exist — the answer is often that the\ntool was there all along and a wrong assumption hid it. Verified 2026-10-10, one session — the four\nclaims below are asserted by the committed, re-runnable test\n`tests\u002Ftest_governance_lock_lifecycle_claims.py` (transcript:\n`docs\u002Fevidence\u002Fgovernance-lock-lifecycle-claims\u002Ftranscript.txt`), which drives the deployed\n`loop-gov-mcp.py` directly:\n\n- **`advance_task_state` is also the recovery for a lock stranded by a CRASHED close.** A close that raises after `feedback_accept` leaves the cycle scored-but-PENDING with the lock still held, and a repeated `end_change` throws again rather than clearing it. A terminal transition (`new_state=\"cancelled\"`) releases it — the tool reports \"a terminal task holds nothing\" — and records the reason in `task_events`. Use that instead of a force\u002Foverride, and say plainly in the reason what crashed, because the range then has no receipt and the next close must mint one.\n- **`advance_task_state` retires a mis-framed cycle without an override.** The user asked how to clear\n  a cycle that kept being refused for scope drift. Reading the tool list settled it in minutes: the\n  state machine carries `cancelled`\u002F`suspended` and logs the reason in `task_events`, so the mis-framed\n  task was retired through it (no `force`, no `user_overrode`) and the real work reopened under a\n  correctly-named cycle, which closed CLEAN first try. A \"no exit\" assumption had already cost four\n  refusals and an hour-long TTL wait.\n- **Read the lock's FULL picture; `active` alone is only YOUR lock.** A call with no args cannot\n  resolve a session, so `active` reports `false` while another session's lock is live on disk — that\n  field answers \"do *I* hold a lock\", never \"is any lock held\". The call also returns `locks` +\n  `live_lock_count` listing every live lock (task, session, agent, repo, heartbeat): read those before\n  concluding none exists, and when the lock FILE says active while `active` says false, **the file is\n  right** — the close will succeed. Do not re-acquire and do not open a carrier cycle; that false\n  negative manufactures the very extra cycle you were trying to avoid.\n- **The lock's repo identity is legible in `repo_path`.** A lock stamped from a git repo carries a\n  NON-EMPTY `repo_path`; one opened where the cwd is NOT a repo (a plain working copy, a deploy dir)\n  has nothing stamped, so it inherits the host-canonical slug with `repo_path` EMPTY. Two locks can\n  name the same slug by opposite routes — read `repo_path` to tell them apart, and treat an empty one\n  as \"this lock does not govern the tree I worked in\": the close gate composes review material from\n  the named repo, so a mis-tagged lock gets reviewed against a tree that cannot contain the work.\n  `loop-gov.py` prints a note naming the cwd and the repo it will claim when it cannot resolve one;\n  run governance from inside the repo, or pass `--repo \u003Cpath>`, rather than accepting the fallback.\n- **`request_interruption` cannot rename a cycle** — it derives the sub-task id by suffixing the\n  parent's, so splitting work with it does not fix a mismatched task id. Renaming needs a NEW\n  `begin_change` under the correct name (a `reframe_change` tool would be the clean fix; until it\n  exists, retire-and-reopen is the sanctioned path).\n- **Order matters: do not `cancel` before interrupting.** `request_interruption` refuses a task already\n  in a terminal state, so a cancel-then-interrupt sequence wedges. Interrupt (or reopen) first; check\n  `TERMINAL_STATES` before sequencing any state transition.\n- **The TTL expiry is a real, usable exit.** After a lock expires, `begin_change` under the\n  correctly-named task opens a fresh cycle. Waiting out the TTL is preferable to forcing a close on a\n  mis-framed one.\n\nGeneral rule: when a gate refuses in a way that looks unbounded, the first move is to re-read the\navailable tools and their parameters — not to re-roll the reviewer, and never to override.\n\n### Pitfall 8: A lock minted WITHOUT repo identity cannot be closed — only a TERMINAL state clears it\n\n`end_change` refuses such a cycle with \"Cannot close: no governed repo to measure complexity — the\nself-adversarial review cannot run\", because the close composes its review material from the repo the\nlock names and this lock names none. Nothing ages it out (Pitfall 6: the owner's own work keeps it\nalive), so the lock outlives every retry. Releases:\n\n- **`advance_task_state(task_id=..., new_state=\"cancelled\", reason=...)`** — terminal, and it reports\n  \"a terminal task holds nothing\" because `_release_lock` does not consult repo identity. Name the\n  cause in the reason; the range is left without a receipt, so whoever pushes must close something.\n- **`blocked` is NOT a release.** It is non-terminal, so it keeps holding the lock — parking a lock\n  you cannot close with `blocked` is what turns a stuck cycle into a stuck repo. From `blocked` the\n  way out is `cancelled` (or `planning`).\n- **A zero-diff placeholder cycle is closed by SCORING it.** `feedback_accept` with an\n  `unscored_reason` takes it PENDING → MOVE_ON; \"it can never close\" is true of `end_change` only, and\n  the remaining work is just the lock release above.\n- **A different session cannot release it.** Locks are session-scoped, so a later session cannot\n  end_change or advance the lock a dead session left; only the TTL purge (or the operator's `rm` of\n  the file) clears it. Say so rather than leaving the next agent hunting for a tool.\n\nDiagnose before concluding: read the lock FILE and check `repo_path` \u002F `repo_slug`; empty or absent\nidentifies this class in one read.\n\nMint sites: any writer that builds a FRESH lock state instead of re-writing one that already carries\nthe repo. Re-writers inherit the repo fields, so all 14 other lock-write call sites are unaffected —\nand when you fix one fresh-state writer, pin it with a test asserting the state it hands to the writer\ncarries `repo_path` AND `repo_slug`. Such a lock also creates no claimable task row, so a promotion\nthat mints one leaves a lock, a cycle and an event but nothing to claim.\n\n**Which refusals free you — and why a freed lock must come with a resolved cycle.** A refusal about\nthe LOCK'S METADATA (the lock names no repo, or names a repo this session is not working in) judged\nnothing: no diff was read, no verdict exists, and **no receipt is written on that path**, so holding\nthe lock authorises nothing while dead-ending the session that holds it — and the sessions queued\nbehind it. Current builds RELEASE the lock on those refusals and close the cycle UNSCORED\n(`MOVE_ON` plus a reason naming the refusal), which makes the terminal-state route above the path\nfor a lock left by an older build or a crashed close rather than the only way out. A verdict about\nthe WORK (findings, reviewer unavailable) is different in kind: the close is refused and the lock is\nreleased so you are not trapped, but the range still needs a CLEAN receipt before it can be pushed —\nso re-check the receipt, do not re-close to \"clear\" it.\n\nAny change that frees a lock must resolve its cycle in the same step. The doctor counts a PENDING\ncycle as EXPECTED while a live lock exists and as a leak FAIL the moment the lock is gone, and ANY\ndoctor FAIL blocks the push for every agent on the host — so releasing alone converts one session's\ndead-end into a host-wide block. Before \"recovering\" a cycle you believe is PENDING, read what the\nscore reports: `MOVE_ON → MOVE_ON` means something already resolved it, so your scoring was a no-op\nrather than the fix, and the remaining problem is elsewhere.\n\n**There are TWO lock-removers, and each needs its own audit.** The MCP releases locks on refusals;\nthe standalone `purge-stale-governance-locks.py` (run by every deploy and by a cron) unlinks stale\nfiles. Fixing one does not fix the class — grep both files for every site that unlinks a lock or\nmakes a task terminal, and check each against the invariant above. The sweep also had a SECOND\ndivergence: its staleness rule was TTL-only, with none of the liveness rescue the MCP predicate\ngained, so it would happily remove a *busy* session's lock (heartbeat frozen through hours of\nediting, no governed call) and that session's next write was refused — the deadlock the rescue exists\nto remove. **A second copy of a predicate is a second rule**: when you touch either path, compare the\nPREDICATE (not just the removal) against the fleet's, and pin the comparison with a test.\n\n### Removing a lock and resolving its cycle are ONE step — and two details of the ORDER trap you\n\n- **Resolve the cycle BEFORE unlinking the file.** A crash between the two must leave a DEAD lock\n  beside a `MOVE_ON` cycle (harmless, and the next sweep removes the file) and never a lockless\n  PENDING cycle, which blocks every push on the host with no owner left to clear it.\n- **Close through the PER-TASK closer, never through an orphan-cycle resolver.** The resolver's own\n  precondition is \"this task holds no live lock\", and at the moment you are about to unlink, the file\n  is still on disk — so routing the close through it closes NOTHING and the leak you set out to\n  remove survives, while the code reads as if it did the work. Prove it with a probe on a throwaway\n  state dir; do not accept the call site by inspection.\n- **A cycle whose work was CANCELLED is closed with no score invented.** `feedback_override`\n  (→ `MOVE_ON`) records that nothing landed; scoring it would claim work that does not exist. Then\n  `end_change` — if the lock is already released it answers \"nothing to release\", which is fine.\n- **The cheapest leak check is the gate itself:** `begin_change` REFUSES while an unscored PENDING\n  cycle exists and NAMES it, so a successful `begin_change` is proof the host is clear and a refusal\n  is proof it is not. `cycle_query` names them directly.\n- **When a release path is added, add it to the sweep test's enumeration.** A class-level rule\n  (\"every site that drops a lock also resolves its cycle\") is held by a test that FAILS on any NEW\n  call site which omits the paired action, with each exemption declared and its justifying gate\n  asserted against the source.\n\n### The sweep's disposition differs from the MCP's ON PURPOSE — do not \"unify\" them\n\nWhen the cycle cannot be resolved, the MCP still releases the lock and the sweep KEEPS it. Both are\nright, and the reason is what each caller's alternative costs:\n\n- **MCP release paths release anyway** — a live session must never be dead-ended by a broken store\n  (no release, no path forward, `force=True` the only exit was the original bug). The leak this can\n  leave is repaired by the resolver, by `reclaim_dead_locks`, or by the >24h auto-resolve.\n- **The unattended sweep keeps the lock** — nothing is waiting on it, so a stale file on disk costs\n  nothing while the lockless PENDING cycle it would create blocks every push on the host. It\n  escalates instead: exit code 2 with an `OPERATOR ACTION` line, never a silent `kept`.\n- **A permanently failing fail-closed path needs an exit code, not a log line.** Silence on a broken\n  store is how a repairable host becomes permanent: a cron that always exits 0 turns a dead DB into\n  background noise. Give the could-not-do-my-job outcome its own non-zero code and say who must act.\n- **A lock file that is unparseable AND well past the TTL is corruption, not a mid-write race.**\n  The mid-write guard (never delete an unparseable file) is right, but a file in that state for\n  hours can never be aged, so it and any cycle behind it sit forever. COLLECT those and report them\n  for cleanup rather than skipping them silently every run.\n\n### Minting a lock is the MIRROR of removing one — the cycle must exist FIRST\n\nThe removal rule (\"removing a lock and resolving its cycle are ONE step\") has a twin that is easier to\nmiss because it lives on the happy path: **a lock is only ever written AFTER the cycle it names exists\nin the store.** Get the order wrong and the failure is the worst kind — the operation reports SUCCESS\nwhile leaving a live lock whose task has no scorable cycle, which is unclosable, unfreeable by\n`begin_change`, and escapable only by an override.\n\n- **Create the cycle first, then write the lock; REFUSE the operation if the create fails.** A refusal\n  is recoverable in seconds; a lock with no cycle costs the session and everything queued behind it.\n- **Never let the cycle create fail SILENTLY.** An inline `INSERT INTO loop_cycles` inside a\n  `try\u002Fexcept` whose fallback is a note like \"(note: no cycle record — DB unavailable)\" is the bug: on a\n  transient DB error the caller gets a lock AND a success message. The create must raise into a refusal.\n- **A second copy of the CREATE is a second rule.** Hunting the class means grepping every lock-writing\n  path for its OWN inline cycle insert — fixing one writer leaves the identical ordering bug in a sibling\n  tool (an ISSUE-PROMOTION path is the classic second copy, because it builds a fresh task outside the\n  normal `begin_change` flow). Prefer ONE shared `_create_pending_cycle(task_id, session_id, outcome)`\n  helper called by every mint site; two implementations drift.\n- **Pin the invariant per mint site, not once for the file.** The test should assert the cycle-create\n  call appears BEFORE the lock write in EACH function that mints, so a NEW call site that omits it fails\n  the suite. A class-level rule held by one site's test protects one site.\n\nThe tell, for diagnosis in the field: `end_change` answers **\"no governance cycle found for this task\"**\nwhile `begin_change` answers **\"a governance session is already active … use force=True\"**. Both messages\nare correct about different stores — the LOCK exists, the CYCLE does not — and that pair is the signature\nof this class, not a scoring problem. Re-score nothing; check whether the lock's task has a cycle row at\nall, then free the lock (a terminal transition) and fix the ordering in the code that minted it.\n\n### A session that resolves NO repo is UNGOVERNED, not lock-blocked — say so, and make recovery one step\n\nGovernance is REPO-SCOPED: a lock binds to a repo, so a call that resolves no repo cannot be\nauthorised by ANY lock. When the gate refuses such a call by telling the agent to \"acquire a lock\",\nthat is an impossible demand, and it becomes a LOCKOUT: the agent cannot mint the lock, and it cannot\nrun the compound it needs to find the checkout, because a compound is write-class. Read-only\nprimitives stay free, so orienting is still possible — the failure is the refusal's framing, not the\nrule.\n\n- **Resolve the repo from the SESSION, not only from the call's arguments.** A command like\n  `git commit -m …` carries no path of its own, so path-argument resolution returns nothing and the\n  call falls through to slug matching alone. Fall back to the repo the session already recorded from\n  an earlier call's arguments — the same repo it has been working in, not a new permission — before\n  concluding there is none.\n- **With no repo, refuse in its OWN words.** Say that governance is repo-scoped so no lock could\n  authorise the call, then name the escapes that actually work: pass the repo on the call\n  (`workdir=\u003Cpath>`), make the command's own path point inside the checkout, or `begin_change` while\n  working in it. Add that read-only commands never need a lock, so they can be used to find the\n  checkout. A generic \"this repo requires an active governance lock\" when there IS no repo makes a\ndead end look like policy — and the agent loops on the same blocked command.\n- **A gate\u002Fplugin fix is not live until the process that LOADS it restarts.** Handing a fleet fix\n  over means naming BOTH steps for the affected host: update (pull the file) and restart (load it).\n  A corrected enforcer on disk changes nothing in a running gateway, and the host stays blocked while\neverything looks fixed.\n\n### Pitfall 9: begin_change SUCCEEDS yet every write still deadlocks — the injection is tool-PREFIX-bound\n\nThe enforcer stamps session_id + repo_path into governance MCP args by matching the TOOL NAME\nprefix (`tool_name.startswith(\"mcp__\u003Cname>__\")`, two matcher sites). Renaming the review MCP\nserver (or any server the enforcer injects into) without updating those matchers silences the\ninjection: the server falls back to its own derivation (env\u002Fper-repo file) and mints locks under a\ndifferent id than the enforcer expects. Signature: a fresh `begin_change` reports success and a lock\nFILE exists, yet every write-class tool still refuses with GOVERNANCE LOCK REQUIRED. Diagnose by\ncomparing `~\u002F.steadfaste-fleet\u002Fstate\u002F.hermes-session-current.id` (the enforcer's canonical id) with\nthe lock file the fresh begin_change just wrote — different ids, and the enforcer can never see\nthat lock. The CLI with an explicit session_id is the recovery: drive\n`python3 ops\u002Fscripts\u002Floop-gov.py begin_change '{\"session_id\": \"\u003Cid from .hermes-session-current.id>\", …}'`\nthrough a composite tool the gate does not hook (terminal itself is refused — the gate is the\nbroken thing), then fix the real defect: add the new prefix to both matchers, pin RED→GREEN with\na test driving `_inject_session_context` under the new name, deploy, reload\u002Frestart; retire any\nlock minted under the derived id with `advance_task_state new_state=cancelled`. Full recipe:\n`rename-sweep` → `references\u002Fmcp-server-name-rename.md`.\n\n### Pitfall 10: A session's governance identity can FREEZE onto the wrong repo — the exit is a FRESH session\n\nGovernance is SESSION-scoped. The session id arrives from the Hermes conversation\n(`kwargs['session_id']`, README \"Session ID Handoff Architecture\") and the governed repo\nis resolved from that session together with the call's cwd\u002Fargs. A session that once\nresolved the WRONG repo can therefore re-tag that same wrong repo on every later\n`begin_change` — so the failure is whole-session, not one bad call: the lock's\n`repo_path`\u002F`repo_slug` name a tree that is not yours, the agent identity can read\n`unknown`, and work in the correct repo keeps being governed against the wrong one.\n\n- **Try the sanctioned escapes first**: run governance from inside your checkout, or\n  pass a `workdir` \u002F `--repo \u003Cpath>` that points into it, so the call resolves the right\n  repo on its own terms before you conclude the session is stuck.\n- **A restart is NOT a remedy.** The identity is keyed to the conversation session, not\n  to the process, so restarting the gateway or the host does not clear it. Do not burn\n  cycles re-running `begin_change` or rebooting, expecting a different tag.\n- **The reliable exit is a NEW conversation (`\u002Fnew`).** A fresh session mints a clean\n  session id and re-resolves the repo from scratch. Before you leave, record the frozen\n  session's state — SHAs, and anything left STAGED (a staged change survives in the\n  index and the next session can commit it) — so the follow-on session finishes the work\n  instead of rediscovering it.\n\n### Pitfall 11: The `loop-gov daemon` doctor WARN re-fires after EVERY fleet-update — only a gateway restart clears it\n\nThe doctor's `loop-gov daemon` check verifies the running loop-gov MCP\ndaemons by CONTENT: each daemon records a stamp\n(`~\u002F.steadfaste-fleet\u002Fstate\u002Floop-gov-daemon.json`) that holds ONE pid plus\nthe sha256 of the module it loaded. Two daemons run (review and\nloop-governance roles) but only the last one to start owns the stamp slot\n— the other daemon can never be content-verified and falls back to\nmtime-vs-start comparison. `fleet-update.sh` force-rewrites every mapped\nfile, so `loop-gov-mcp.py`'s mtime advances past both daemons' start even\nwhen the bytes are byte-identical — after EVERY deploy the unstamped\ndaemon reads \"COULD NOT VERIFY by content\" and the WARN re-fires no matter\nhow recently the gateway restarted. The check only passes while the module\nmtime predates the daemon start, i.e. after a gateway restart that follows\nthe last deploy. So: read the WARN as a deploy artifact, not stale code;\nclear it with `hermes gateway restart` after the final deploy; and never\nhand-edit or fabricate the stamp file — the check is only meaningful if\nthe daemon itself wrote it. Root cause is the single-slot stamp: the\ndurable fix is a per-pid stamp map so every daemon is verified by content\nand the byte-identical rewrite stops re-warning.\n\n### A wide close judges a WAVE of blobs per pass — concurrency, never a longer window\n\nA close refused with **\"N blob(s) of the push range still carry no review verdict\"** names the exact\nremaining files. The per-blob pass now issues a **wave** of `BLOB_REVIEW_CONCURRENCY` (4) reviewer\ncalls CONCURRENTLY, and because elapsed time is the SLOWEST call rather than their sum, four calls of\n180–220 s land inside the same ~240 s window. Measured: a four-file change closes in ONE pass, and a\n15-file range in four round trips where it previously took fifteen. Verdicts are keyed by blob\nCONTENT, so each pass resumes from where the last stopped instead of redoing judged work. Re-issue\n`end_change` until it reports the session closed — the counter must decrease (by up to the wave\nsize), and a repeat that does NOT decrease is the real signal something is wrong. Do not read the\nrepetition as a broken loop, and do not widen the review range to shorten it.\n\n**A blob judged NOT clean must CHANGE content — re-issuing on identical bytes returns nothing.**\nThe close reads \"no blob was SENT this pass ... re-reviewing identical bytes cannot produce a\ndifferent verdict\". That is the save-and-stop signal, not a hang: fix the file so it is a NEW blob,\ncommit the fix (a partial `git commit -m msg -- \u003Cpaths>` — the shared-index hook refuses an\nun-scoped bare commit), then re-issue `end_change`. The committed fix is judged on its own and the\nclose continues from there. Do NOT re-roll the reviewer on unchanged material and do NOT open a\ncarrier cycle — neither produces a different verdict.\n\n**A reviewer finding on a TEST is often a real lesson: fix the test, not the production code.** The\ntell is a meaningful finding that names exact lines in the test file (e.g. a test mutates\n`os.environ` without restoring it). The fix is the test using the fixture (`monkeypatch.setenv`,\nwhich restores in a finally regardless of assertion outcome) — shipped as its own small commit, so\nit is a new blob for the close. A dependent-classes finding (\"the function is in the sibling file\")\nmay be a false positive the reviewer itself tells you to downgrade to info-level — read the\nfinding's own recommendation before treating it as a blocker.\n\n**Do NOT raise the MCP client ceiling to shorten it.** This skill used to call that \"the lever that\nactually shortens it\", and that is wrong twice over: the operator's standing requirement is that\nreviews stay under 300 s — the module records it verbatim, \"the window is never raised\" — and it\nwould not have helped anyway, because a sequential pass already spent its whole window on ONE call.\nConcurrency is what fits several blobs per round trip, with the same reviewer, the same prompt and\nthe same verdict. Raising a THRESHOLD (blobs per window, the wide-diff split line count) buys passes\nby reviewing less and is a governance reduction.\nMore per call, never less per blob.\n\n### Judging a lock dead\n\nThe predicate is \"heartbeat past the lock's own TTL **AND** no evidence the agent is working\". Three\nrules make the second half safe, and all three are load-bearing:\n\n- **Scope the liveness evidence by AUTHOR, not by repo.** A commit authored by the lock's own agent\n  counts; a peer's commit in the same repo does not (that would only delay the peer's own takeover,\n  which is the deadlock again). Scoping by repo ALONE is the trap: a session doing a long stretch in\n  a DIFFERENT checkout authors nothing in the lock's repo, so it gets judged dead while it is holding\n  the lock right now. Look across the candidate repos under HOME for that author.\n- **The widening is safe only because the renewal budget bounds it** (`LIVENESS_MAX_RENEWALS`) — do\n  not report the widening as harmless on its own. The budget is PER ACQUISITION, which is a dependency\n  you must verify, not assume: a new acquisition builds a FRESH lock state, so the counter starts at\n  0. If a release\u002Fre-acquire cycle left the counter at its ceiling, the bound would be a one-time\n  gate instead of a per-session limit.\n- **Authorship is not identity.** A cron or daemon committing AS that agent (or `--author=`) is\n  indistinguishable from the session and reads as proof of life. The failure mode is a lock kept\n  alive for a session that is gone, bounded to ONE renewal past the TTL — say that trade-off in the\n  docstring rather than claiming the check is sound, and name the stronger signal you would want\n  (a per-session token the enforcer injects, which cannot be forged like a git author).\n\n### Testing governance helpers\n\n- **Never drive an entry point whose PRECONDITIONS consult live state to assert one branch.**\n  `begin_change` runs the dogfood check and the unscored-PENDING-cycle check before the refusal you\n  want to test, so the assertion ends up measuring the host (a dirty tree or an open cycle fails a\n  message test). Extract the decision\u002Fmessage into its own function and drive that — and assert BOTH\n  directions: the repo-less lock gets the terminal-state guidance, a normal lock still gets the\n  ordinary \"call end_change\".\n- **Write lock fixtures with the module's OWN writer** (`_write_lock(state, {\"session_id\": sid})`),\n  never a hand-built path: the path helper need not share the global you swapped, so the entry point\n  starts a NEW session and the test passes while measuring the wrong subject.\n\n## Verification\n\n- `check_lock` confirms the purge (active: false) — expect this after every update run\n- `cycle_query` shows no PENDING cycles before `end_change`\n- `end_change` returns success (no rejection)\n- Doctor overall line eventually shows the reduced warn\u002Ffail counts\n\n\n## Related (user-owned, may need `hermes curator adopt`)\n\n- `fleet-deployment-sync` — deploy mechanics, invocation forms, immutable-file pitfalls\n- `fleet-preflight` — pre-flight checks + fleet-update side-effect table\n- `loop-governance` — scoring internals, lock-lifecycle race history\n",{"name":5,"author":24,"license":15,"version":25,"category":26,"metadata":27,"platforms":39,"description":7},"Steadfaste Fleet curator","1.1.0","devops",{"hermes":28},{"tags":29,"related_skills":35},[30,31,32,33,34],"governance","lock","fleet-update","loop-governance","deploy",[33,36,37,38],"fleet-deployment-sync","fleet-preflight","two-hard-rules",[40,41],"linux","macos","main","9dc0e92c5fa81d4db5292b205716e8ea0c00d10e","skills\u002Fdevops\u002Fgovernance-lock-lifecycle",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":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill governance-lock-lifecycle",{"tool":57,"command":58},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill governance-lock-lifecycle",{"tool":60,"command":61},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill governance-lock-lifecycle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-lock-lifecycle\u002FSKILL.md",true,[65,71],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Fgate-command-classification.md","REFERENCE","参考文档",2194,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-lock-lifecycle\u002Freferences\u002Fgate-command-classification.md",{"path":72,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Fpublishing-a-reviewed-range.md",5600,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fgovernance-lock-lifecycle\u002Freferences\u002Fpublishing-a-reviewed-range.md",[76,84,91,98,105,112],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":83},"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":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":83},"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":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":83},"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":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":83},"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":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":83},"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":113,"name":37,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":83},"01M78SP1CHW0T0BWE5ZT6JBPX8","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",[],[]]