[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M758C569YWPGEYGNPQ70SY4M":3,"skill-same:01M758C569YWPGEYGNPQ70SY4M":58},{"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":29,"commitSha":30,"skillDirectory":31,"forksCount":32,"repositoryHtmlUrl":33,"repositoryHomepageUrl":34,"ownerHtmlUrl":35,"ownerBlogUrl":6,"ownerDescription":36,"updatedAt":37,"install":38,"resources":51},"01M758C569YWPGEYGNPQ70SY4M","migration-deploy-verification",null,"Use when a repo migration is missing from the live DB.","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\u002Fmigration-deploy-verification\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: migration-deploy-verification\ndescription: \"Use when a repo migration is missing from the live DB.\"\nversion: 1.0.0\ncategory: devops\nplatforms: [linux, macos]\n---\n\n# Migration Deploy Verification\n\nVersioned SQL migrations in this fleet deploy through a chain of FIVE\nindependent links. Any one link missing silently breaks the whole chain —\nthe repo can carry the fix while every host keeps the old broken function.\n\n```\nops\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__*.sql        (1) repo file committed\n  → register() line in fleet-update.sh      (2) deploy map\n  → ${FLEET_DEPLOY_HOME}\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__*.sql   (3) deployed dir\n  → migrate.py (globs the DEPLOYED dir)      (4) migration runner\n  → \u003Csvc>.schema_version row                 (5) live DB applied\n```\n\n## The critical fact: migrate.py scans the DEPLOYED dir, not the repo\n\n`ops\u002Fservices\u002F\u003Csvc>\u002Fmigrate.py` discovers migrations with\n`schema_dir.glob(\"*.sql\")` where schema_dir is its **sibling deployed**\ndirectory (`~\u002F.steadfaste-fleet\u002Fservices\u002F\u003Csvc>\u002Fschema\u002F`). A migration committed\nto the repo but missing its `register()` line never reaches the deployed dir,\nso the version-gated runner NEVER applies it — even though the file \"exists\"\nin the repo and tests pass against the repo path.\n\n## Verify all 5 links (never stop at link 1)\n\n```bash\n# 1. Repo has the migration?\nls ops\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__*.sql\n\n# 2. Deploy map has it?  (MISSING = the bug)\ngrep -n 'register.*vNNN' ops\u002Fscripts\u002Ffleet-update.sh\n\n# 3. Deployed dir has it?\nls ~\u002F.steadfaste-fleet\u002Fservices\u002F\u003Csvc>\u002Fschema\u002F\n\n# 4. Runner sees it — run from the DEPLOYED path, not the repo:\npython3 ~\u002F.steadfaste-fleet\u002Fservices\u002F\u003Csvc>\u002Fmigrate.py   # expect \"up to date (version N)\" or applies\n\n# 5. Live DB applied it?\ndocker exec -i mycortex-postgres psql -U mycortex -d mycortex -t -A \\\n  -c \"SELECT version, applied_at, applied_by FROM \u003Csvc>.schema_version ORDER BY version;\"\n```\n\n## Masking trap: hand-migrated DB hides the gap\n\n`schema_version.applied_by=mycortex` + `applied_at` EARLIER than the commit\ntimestamp = someone applied the SQL to the DB by hand (or pointed migrate.py\nat the repo dir). The local host LOOKS fixed (\"schema_version is at N!\"), but\nevery other host is still broken — the deploy map was never updated. A\n\"root cause confirmed\" report can be partially stale: **verify the live DB\nbefore trusting the narrative**, then fix the durable gap (link 2).\n\nReal case 2026-08-07: tasks v003 (cancelled→column NULL) and v004 (ON\nCONFLICT column preservation) sat in the repo with their L1 test while\nfleet-update.sh shipped only v001+v002. Local DB was hand-migrated 9\nminutes before the commit; fleet hosts stayed at version 2 with the broken\n`WHEN 'cancelled' THEN 'done'` derivation (any cancel → tasks_check\nviolation). The deploy-map gap was the real remaining bug.\n\n## Fix pattern (orchestrator lane)\n\n1. Add the missing lines to `ops\u002Fscripts\u002Ffleet-update.sh`:\n   ```bash\n   register \"ops\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__foo.sql\" \"${FLEET_DEPLOY_HOME}\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__foo.sql\"\n   ```\n2. Deploy via the sanctioned invocation: `bash ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Ffleet-update.sh`\n3. Confirm migrate.py on the already-migrated host reports a no-op (idempotent):\n   `tasks schema up to date (version N) — no-op`\n4. Commit + push. Every host's next fleet-update deploys the files and\n   migrate.py takes their DB to the top version automatically.\n\n## Verification pattern (prove it, then attack the premise)\n\n- **Hermetic L1 test** on a scratch DB (`bash tests\u002Ftest-tasks-schema.sh`\n  style): fresh DB v001→vNNN, assert `schema_version == count of repo v*.sql\n  files`, assert the fixed behaviour (e.g. cancelled→column NULL).\n- **Live write-probe** through the real CLI: create → update status → verify\n  row state via psql → clean up (CLI save-end archives; delete the probe row\n  from the archive table).\n- **Re-deploy attack test**: run fleet-update.sh TWICE, confirm the new\n  files persist in the deployed dir — registered files survive re-deploys,\n  one-off manual copies get dropped\u002Foverwritten.\n- **A4 adversarial gates** on fleet-update.sh (enforcement script) and any\n  tests\u002F file before push.\n\n## Trigger\n\nUse this skill when:\n- A migration \"exists\" but the DB schema_version is stuck below it\n- Adding\u002Frenumbering a migration (walk the chain before committing)\n- A bug report claims the \"fix is in the repo\" but the live DB still misbehaves\n- Any \"committed but not deployed\" symptom for schema files\n\n## References\n\n- `references\u002Ftasks-v003-v004-deploy-gap-2026-08-07.md` — full session trace: masking, diagnosis, fix, verification evidence\n","# Migration Deploy Verification\n\nVersioned SQL migrations in this fleet deploy through a chain of FIVE\nindependent links. Any one link missing silently breaks the whole chain —\nthe repo can carry the fix while every host keeps the old broken function.\n\n```\nops\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__*.sql        (1) repo file committed\n  → register() line in fleet-update.sh      (2) deploy map\n  → ${FLEET_DEPLOY_HOME}\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__*.sql   (3) deployed dir\n  → migrate.py (globs the DEPLOYED dir)      (4) migration runner\n  → \u003Csvc>.schema_version row                 (5) live DB applied\n```\n\n## The critical fact: migrate.py scans the DEPLOYED dir, not the repo\n\n`ops\u002Fservices\u002F\u003Csvc>\u002Fmigrate.py` discovers migrations with\n`schema_dir.glob(\"*.sql\")` where schema_dir is its **sibling deployed**\ndirectory (`~\u002F.steadfaste-fleet\u002Fservices\u002F\u003Csvc>\u002Fschema\u002F`). A migration committed\nto the repo but missing its `register()` line never reaches the deployed dir,\nso the version-gated runner NEVER applies it — even though the file \"exists\"\nin the repo and tests pass against the repo path.\n\n## Verify all 5 links (never stop at link 1)\n\n```bash\n# 1. Repo has the migration?\nls ops\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__*.sql\n\n# 2. Deploy map has it?  (MISSING = the bug)\ngrep -n 'register.*vNNN' ops\u002Fscripts\u002Ffleet-update.sh\n\n# 3. Deployed dir has it?\nls ~\u002F.steadfaste-fleet\u002Fservices\u002F\u003Csvc>\u002Fschema\u002F\n\n# 4. Runner sees it — run from the DEPLOYED path, not the repo:\npython3 ~\u002F.steadfaste-fleet\u002Fservices\u002F\u003Csvc>\u002Fmigrate.py   # expect \"up to date (version N)\" or applies\n\n# 5. Live DB applied it?\ndocker exec -i mycortex-postgres psql -U mycortex -d mycortex -t -A \\\n  -c \"SELECT version, applied_at, applied_by FROM \u003Csvc>.schema_version ORDER BY version;\"\n```\n\n## Masking trap: hand-migrated DB hides the gap\n\n`schema_version.applied_by=mycortex` + `applied_at` EARLIER than the commit\ntimestamp = someone applied the SQL to the DB by hand (or pointed migrate.py\nat the repo dir). The local host LOOKS fixed (\"schema_version is at N!\"), but\nevery other host is still broken — the deploy map was never updated. A\n\"root cause confirmed\" report can be partially stale: **verify the live DB\nbefore trusting the narrative**, then fix the durable gap (link 2).\n\nReal case 2026-08-07: tasks v003 (cancelled→column NULL) and v004 (ON\nCONFLICT column preservation) sat in the repo with their L1 test while\nfleet-update.sh shipped only v001+v002. Local DB was hand-migrated 9\nminutes before the commit; fleet hosts stayed at version 2 with the broken\n`WHEN 'cancelled' THEN 'done'` derivation (any cancel → tasks_check\nviolation). The deploy-map gap was the real remaining bug.\n\n## Fix pattern (orchestrator lane)\n\n1. Add the missing lines to `ops\u002Fscripts\u002Ffleet-update.sh`:\n   ```bash\n   register \"ops\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__foo.sql\" \"${FLEET_DEPLOY_HOME}\u002Fservices\u002F\u003Csvc>\u002Fschema\u002FvNNN__foo.sql\"\n   ```\n2. Deploy via the sanctioned invocation: `bash ~\u002Fsteadfaste-fleet\u002Fops\u002Fscripts\u002Ffleet-update.sh`\n3. Confirm migrate.py on the already-migrated host reports a no-op (idempotent):\n   `tasks schema up to date (version N) — no-op`\n4. Commit + push. Every host's next fleet-update deploys the files and\n   migrate.py takes their DB to the top version automatically.\n\n## Verification pattern (prove it, then attack the premise)\n\n- **Hermetic L1 test** on a scratch DB (`bash tests\u002Ftest-tasks-schema.sh`\n  style): fresh DB v001→vNNN, assert `schema_version == count of repo v*.sql\n  files`, assert the fixed behaviour (e.g. cancelled→column NULL).\n- **Live write-probe** through the real CLI: create → update status → verify\n  row state via psql → clean up (CLI save-end archives; delete the probe row\n  from the archive table).\n- **Re-deploy attack test**: run fleet-update.sh TWICE, confirm the new\n  files persist in the deployed dir — registered files survive re-deploys,\n  one-off manual copies get dropped\u002Foverwritten.\n- **A4 adversarial gates** on fleet-update.sh (enforcement script) and any\n  tests\u002F file before push.\n\n## Trigger\n\nUse this skill when:\n- A migration \"exists\" but the DB schema_version is stuck below it\n- Adding\u002Frenumbering a migration (walk the chain before committing)\n- A bug report claims the \"fix is in the repo\" but the live DB still misbehaves\n- Any \"committed but not deployed\" symptom for schema files\n\n## References\n\n- `references\u002Ftasks-v003-v004-deploy-gap-2026-08-07.md` — full session trace: masking, diagnosis, fix, verification evidence\n",{"name":5,"version":24,"category":25,"platforms":26,"description":7},"1.0.0","devops",[27,28],"linux","macos","main","9dc0e92c5fa81d4db5292b205716e8ea0c00d10e","skills\u002Fdevops\u002Fmigration-deploy-verification",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":39,"prompt":49,"zipAvailable":50},[40,43,46],{"tool":41,"command":42},"npx","npx skills add lukemcqueen\u002Fsteadfaste-fleet --skill migration-deploy-verification",{"tool":44,"command":45},"bunx","bunx skills add lukemcqueen\u002Fsteadfaste-fleet --skill migration-deploy-verification",{"tool":47,"command":48},"pnpm","pnpm dlx skills add lukemcqueen\u002Fsteadfaste-fleet --skill migration-deploy-verification","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmigration-deploy-verification\u002FSKILL.md",true,[52],{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Ftasks-v003-v004-deploy-gap-2026-08-07.md","REFERENCE","参考文档",4161,"https:\u002F\u002Fgithub.com\u002Flukemcqueen\u002Fsteadfaste-fleet\u002Fblob\u002Fmain\u002Fskills\u002Fdevops\u002Fmigration-deploy-verification\u002Freferences\u002Ftasks-v003-v004-deploy-gap-2026-08-07.md",[59,67,74,81,88,95],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":66},"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":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":66},"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":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":66},"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":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":66},"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":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":66},"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":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":66},"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",[],[]]