scip-query 0.19.4 → 0.19.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +75 -1
- package/README.md +242 -49
- package/dist/augment-vue-worker.js +1 -1
- package/dist/{chunk-2YU7I3QO.js → chunk-24QNP7MN.js} +2 -2
- package/dist/{chunk-CNKAGUPL.js → chunk-26X7KCJR.js} +2 -2
- package/dist/{chunk-GPBBJ5Y4.js → chunk-273W2U4Y.js} +3 -3
- package/dist/{chunk-7GXM52MI.js → chunk-2CVXCGL4.js} +2 -2
- package/dist/{chunk-ABMYA4TN.js → chunk-2EZSOTSY.js} +2 -2
- package/dist/{chunk-HKEHS2AS.js → chunk-2GSQR6YA.js} +2 -2
- package/dist/{chunk-FECYOO5O.js → chunk-2OXVAGGT.js} +2 -2
- package/dist/chunk-2ZOCHAL2.js +8 -0
- package/dist/{chunk-QGXBRIM5.js → chunk-336DC5NJ.js} +2 -2
- package/dist/chunk-35SQLYCQ.js +2 -0
- package/dist/{chunk-VXQNNXJE.js → chunk-3OIKRYU5.js} +2 -2
- package/dist/{chunk-52ZYCAEO.js → chunk-47X75ZKH.js} +2 -2
- package/dist/{chunk-NPKYOIFM.js → chunk-4CGVLUDP.js} +2 -2
- package/dist/chunk-4RI4BJGT.js +8 -0
- package/dist/{chunk-P2PC2WGR.js → chunk-52HQTTPB.js} +2 -2
- package/dist/{chunk-YNRNA5LK.js → chunk-5OC3HWP5.js} +2 -2
- package/dist/{chunk-STOL2BTL.js → chunk-6XFC7PQ5.js} +2 -2
- package/dist/{chunk-J77UIT3I.js → chunk-6XHTISLI.js} +2 -2
- package/dist/chunk-6YTSKJJ3.js +2 -0
- package/dist/{chunk-BTEE5NZQ.js → chunk-7E3TH5ZN.js} +2 -2
- package/dist/{chunk-X6D5IC6I.js → chunk-7LABSJSR.js} +2 -2
- package/dist/chunk-7Q6VYYCH.js +2 -0
- package/dist/{chunk-FWUUZTIO.js → chunk-A43URCQ3.js} +2 -2
- package/dist/chunk-A63U2W3P.js +3 -0
- package/dist/{chunk-3MJ5YA4Y.js → chunk-ADFSIJP2.js} +2 -2
- package/dist/chunk-AOLE4DYM.js +6 -0
- package/dist/chunk-APMMR5Y2.js +2 -0
- package/dist/chunk-B5MHCHP3.js +107 -0
- package/dist/{chunk-4RSI5EMG.js → chunk-CSTYYXKC.js} +2 -2
- package/dist/{chunk-25LPM4DG.js → chunk-CYJM7CYF.js} +2 -2
- package/dist/{chunk-S44IULR6.js → chunk-DD5BOU5I.js} +2 -2
- package/dist/{chunk-YGAGTIDK.js → chunk-DGMCFMPG.js} +7 -7
- package/dist/{chunk-UOAV44HR.js → chunk-E2ZXPB7J.js} +2 -2
- package/dist/{chunk-IZKFSVBV.js → chunk-EVOC5I5I.js} +2 -2
- package/dist/{chunk-XTX6QHOF.js → chunk-F42A3AKG.js} +2 -2
- package/dist/{chunk-Q4IIEGXJ.js → chunk-FHCTEANE.js} +2 -2
- package/dist/{chunk-3SVWW4PN.js → chunk-FKGN4A4E.js} +2 -2
- package/dist/{chunk-IG7N5ZIK.js → chunk-FQTPPXNA.js} +2 -2
- package/dist/{chunk-F6O7AAC3.js → chunk-G4UQL4CP.js} +2 -2
- package/dist/chunk-GA64UPMI.js +6 -0
- package/dist/{chunk-ZXJYMGD3.js → chunk-GK3GRUJX.js} +2 -2
- package/dist/chunk-HEBAY673.js +2 -0
- package/dist/chunk-HELS7KFF.js +2 -0
- package/dist/{chunk-B5NLK2B3.js → chunk-IPDCSB6N.js} +2 -2
- package/dist/{chunk-M7MTH5NR.js → chunk-IYAOX36F.js} +2 -2
- package/dist/{chunk-YVVCVR2L.js → chunk-J7VT2CRB.js} +2 -2
- package/dist/{chunk-4333ETTV.js → chunk-JELJLXEE.js} +2 -2
- package/dist/{chunk-LBMJEAEW.js → chunk-JERWGHQT.js} +2 -2
- package/dist/chunk-JJJCO4QC.js +945 -0
- package/dist/{chunk-6E7UTQY7.js → chunk-JZNLMHWY.js} +2 -2
- package/dist/{chunk-R4FQGQ4X.js → chunk-K42M2KWT.js} +2 -2
- package/dist/{chunk-H7UKLTWJ.js → chunk-KLVJABXA.js} +2 -2
- package/dist/chunk-KP4KBDVF.js +3 -0
- package/dist/{chunk-RV2FQIX3.js → chunk-LMFVTUW2.js} +2 -2
- package/dist/chunk-LRTP3DKL.js +3 -0
- package/dist/{chunk-U6WNH5GC.js → chunk-MGBJHRFB.js} +2 -2
- package/dist/{chunk-QDV6RDCP.js → chunk-MLGTCX56.js} +2 -2
- package/dist/{chunk-54HA4ZXH.js → chunk-N3SE646F.js} +2 -2
- package/dist/{chunk-KP6XRY5Z.js → chunk-NBRUH7OE.js} +2 -2
- package/dist/{chunk-M7AIS73L.js → chunk-NN4ZIRPK.js} +2 -2
- package/dist/{chunk-I5RJM53C.js → chunk-NQLSSVOB.js} +2 -2
- package/dist/{chunk-4SALD7RU.js → chunk-OBKDTVZ3.js} +2 -2
- package/dist/{chunk-GBQ5NYPR.js → chunk-OHWZKLVA.js} +6 -6
- package/dist/{chunk-6NSFJYRC.js → chunk-OP3MTFJR.js} +2 -2
- package/dist/{chunk-EOOJGLDU.js → chunk-OQ2A4G2G.js} +2 -2
- package/dist/{chunk-DLWR3NUU.js → chunk-P6HBYNBE.js} +2 -2
- package/dist/{chunk-QVWS2VWZ.js → chunk-PC44K7RF.js} +2 -2
- package/dist/{chunk-A2EZV2UM.js → chunk-QBYYWGAT.js} +2 -2
- package/dist/{chunk-QRGV2F7L.js → chunk-QHKUY4FW.js} +2 -2
- package/dist/chunk-QHRL4LKM.js +2 -0
- package/dist/{chunk-I5AWSI2G.js → chunk-QQWOFXNW.js} +2 -2
- package/dist/{chunk-WQTAC523.js → chunk-RBFFD4V2.js} +2 -2
- package/dist/{chunk-SOAT6NLA.js → chunk-RJHCPSZ7.js} +2 -2
- package/dist/{chunk-VGRICIQI.js → chunk-RWRLUZ6U.js} +2 -2
- package/dist/{chunk-4T3LTWUS.js → chunk-S2GP3CU3.js} +2 -2
- package/dist/{chunk-HEXVUYFQ.js → chunk-SHKZ7OVJ.js} +2 -2
- package/dist/{chunk-NSS46APD.js → chunk-TFUU5MQQ.js} +2 -2
- package/dist/{chunk-IUFDSKGG.js → chunk-TYQ76QHQ.js} +2 -2
- package/dist/{chunk-NRCXJDHL.js → chunk-U5CNPPTZ.js} +2 -2
- package/dist/{chunk-MITTUCEH.js → chunk-UQK5CRUK.js} +2 -2
- package/dist/{chunk-XLTP42QA.js → chunk-UUJBLG6J.js} +2 -2
- package/dist/chunk-UXP636P5.js +144 -0
- package/dist/{chunk-64RFXJT5.js → chunk-VEVBIAOJ.js} +6 -6
- package/dist/chunk-VKRQDBW5.js +9 -0
- package/dist/{chunk-C7NIYIQ4.js → chunk-VOQFGC2W.js} +4 -4
- package/dist/{chunk-DZ74OMG6.js → chunk-VP542C25.js} +2 -2
- package/dist/{chunk-Q3AFUTGB.js → chunk-WMXRRBII.js} +2 -2
- package/dist/{chunk-ZGZUZ7XE.js → chunk-WXAAURU7.js} +2 -2
- package/dist/chunk-X3NLZHPA.js +20 -0
- package/dist/{chunk-WER3B7MI.js → chunk-XF3KLXN3.js} +2 -2
- package/dist/{chunk-NH5ALKPW.js → chunk-XVJ3V7LM.js} +2 -2
- package/dist/{chunk-4XTA5OMB.js → chunk-YGQN3XGZ.js} +2 -2
- package/dist/{chunk-CFMXJPHH.js → chunk-YHXBD52M.js} +2 -2
- package/dist/{chunk-7B3UPBVA.js → chunk-YLVE3SXZ.js} +2 -2
- package/dist/{chunk-YIJ7ZAA4.js → chunk-YTUD45PU.js} +2 -2
- package/dist/{chunk-VTKGCT3V.js → chunk-YWB2EBNB.js} +2 -2
- package/dist/{chunk-UKZBVX4U.js → chunk-Z2LHPIOM.js} +2 -2
- package/dist/chunk-Z5QQPJ3U.js +30 -0
- package/dist/{chunk-NZL2DBT7.js → chunk-ZLJLE6LK.js} +2 -2
- package/dist/{chunk-XYADIZHU.js → chunk-ZTTISZ7J.js} +2 -2
- package/dist/cli.js +3 -3
- package/dist/command-descriptors-SJDZ7QGR.js +617 -0
- package/dist/{config-types-D20KuvvZ.d.ts → config-types-BWQ5xPGI.d.ts} +4 -0
- package/dist/{db-G_II8yXU.d.ts → db-B0r1o7Vt.d.ts} +18 -1
- package/dist/direct-navigation-HTKOZEOM.js +3 -0
- package/dist/{health-oblXYgkF.d.ts → health-CFnlCiTz.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/postinstall.js +1 -1
- package/dist/queries/affected.d.ts +2 -2
- package/dist/queries/affected.js +1 -1
- package/dist/queries/architecture.d.ts +2 -2
- package/dist/queries/architecture.js +1 -1
- package/dist/queries/bottlenecks.d.ts +2 -2
- package/dist/queries/bottlenecks.js +1 -1
- package/dist/queries/by-kind.d.ts +2 -2
- package/dist/queries/by-kind.js +1 -1
- package/dist/queries/call-graph.d.ts +2 -2
- package/dist/queries/call-graph.js +1 -1
- package/dist/queries/change-surface.d.ts +2 -2
- package/dist/queries/change-surface.js +1 -1
- package/dist/queries/cleanup-plan.d.ts +2 -2
- package/dist/queries/cleanup-plan.js +1 -1
- package/dist/queries/co-change.d.ts +2 -2
- package/dist/queries/co-change.js +1 -1
- package/dist/queries/code.d.ts +2 -2
- package/dist/queries/code.js +1 -1
- package/dist/queries/complexity-hotspots.d.ts +2 -2
- package/dist/queries/complexity-hotspots.js +1 -1
- package/dist/queries/complexity.d.ts +2 -2
- package/dist/queries/complexity.js +1 -1
- package/dist/queries/convergence.d.ts +2 -2
- package/dist/queries/convergence.js +1 -1
- package/dist/queries/coupling.d.ts +2 -2
- package/dist/queries/coupling.js +1 -1
- package/dist/queries/cycles.d.ts +2 -2
- package/dist/queries/cycles.js +1 -1
- package/dist/queries/dataflow.d.ts +2 -2
- package/dist/queries/dataflow.js +1 -1
- package/dist/queries/dead.d.ts +2 -2
- package/dist/queries/dead.js +1 -1
- package/dist/queries/decorative-checkers.d.ts +3 -3
- package/dist/queries/decorative-checkers.js +1 -1
- package/dist/queries/deep-chains.d.ts +2 -2
- package/dist/queries/deep-chains.js +1 -1
- package/dist/queries/deps.d.ts +2 -2
- package/dist/queries/deps.js +1 -1
- package/dist/queries/diff-gate.d.ts +30 -2
- package/dist/queries/diff-gate.js +1 -1
- package/dist/queries/diff-impact.d.ts +2 -2
- package/dist/queries/diff-impact.js +1 -1
- package/dist/queries/doc-drift.d.ts +2 -2
- package/dist/queries/doc-drift.js +1 -1
- package/dist/queries/drift.d.ts +2 -2
- package/dist/queries/drift.js +1 -1
- package/dist/queries/duplicate-bodies.d.ts +2 -2
- package/dist/queries/duplicate-bodies.js +1 -1
- package/dist/queries/extract-candidates.d.ts +2 -2
- package/dist/queries/extract-candidates.js +1 -1
- package/dist/queries/fan.d.ts +2 -2
- package/dist/queries/fan.js +1 -1
- package/dist/queries/files.d.ts +2 -2
- package/dist/queries/health.d.ts +3 -3
- package/dist/queries/health.js +1 -1
- package/dist/queries/hierarchy.d.ts +2 -2
- package/dist/queries/hierarchy.js +1 -1
- package/dist/queries/hotspots.d.ts +2 -2
- package/dist/queries/hotspots.js +1 -1
- package/dist/queries/imports.d.ts +2 -2
- package/dist/queries/imports.js +1 -1
- package/dist/queries/incomplete-migration.d.ts +2 -2
- package/dist/queries/incomplete-migration.js +1 -1
- package/dist/queries/index.d.ts +17 -3
- package/dist/queries/index.js +1 -1
- package/dist/queries/isolated.d.ts +2 -2
- package/dist/queries/isolated.js +1 -1
- package/dist/queries/locality-candidates.d.ts +2 -2
- package/dist/queries/locality-candidates.js +1 -1
- package/dist/queries/members.d.ts +2 -2
- package/dist/queries/members.js +1 -1
- package/dist/queries/methods.d.ts +2 -2
- package/dist/queries/methods.js +1 -1
- package/dist/queries/not-implemented.d.ts +3 -3
- package/dist/queries/not-implemented.js +1 -1
- package/dist/queries/outline.d.ts +2 -2
- package/dist/queries/outline.js +1 -1
- package/dist/queries/passthrough-candidates.d.ts +2 -2
- package/dist/queries/passthrough-candidates.js +1 -1
- package/dist/queries/plan-context.d.ts +2 -2
- package/dist/queries/plan-context.js +1 -1
- package/dist/queries/react-component-duplicates.d.ts +2 -2
- package/dist/queries/react-component-duplicates.js +1 -1
- package/dist/queries/react-hook-candidates.d.ts +2 -2
- package/dist/queries/react-hook-candidates.js +1 -1
- package/dist/queries/react-large-component-pressure.d.ts +2 -2
- package/dist/queries/react-large-component-pressure.js +1 -1
- package/dist/queries/recent-duplicates.d.ts +2 -2
- package/dist/queries/recent-duplicates.js +1 -1
- package/dist/queries/redundant-reexports.d.ts +2 -2
- package/dist/queries/redundant-reexports.js +1 -1
- package/dist/queries/refs.d.ts +2 -2
- package/dist/queries/refs.js +1 -1
- package/dist/queries/self-audit.d.ts +2 -2
- package/dist/queries/self-audit.js +1 -1
- package/dist/queries/similar-chains.d.ts +2 -2
- package/dist/queries/similar-chains.js +1 -1
- package/dist/queries/similar-files.d.ts +2 -2
- package/dist/queries/similar-files.js +1 -1
- package/dist/queries/similar-signatures.d.ts +2 -2
- package/dist/queries/similar-signatures.js +1 -1
- package/dist/queries/similar.d.ts +2 -2
- package/dist/queries/similar.js +1 -1
- package/dist/queries/slice.d.ts +2 -2
- package/dist/queries/slice.js +1 -1
- package/dist/queries/stale-abstractions.d.ts +2 -2
- package/dist/queries/stale-abstractions.js +1 -1
- package/dist/queries/stats.d.ts +2 -2
- package/dist/queries/stats.js +1 -1
- package/dist/queries/surface.d.ts +2 -2
- package/dist/queries/surface.js +1 -1
- package/dist/queries/symbols.d.ts +2 -2
- package/dist/queries/symbols.js +1 -1
- package/dist/queries/system.d.ts +2 -2
- package/dist/queries/system.js +1 -1
- package/dist/queries/test-quality.d.ts +2 -2
- package/dist/queries/test-quality.js +1 -1
- package/dist/queries/trace.d.ts +2 -2
- package/dist/queries/trace.js +1 -1
- package/dist/queries/twin-ab.d.ts +3 -3
- package/dist/queries/twin-ab.js +1 -1
- package/dist/queries/twin-drift.d.ts +2 -2
- package/dist/queries/twin-drift.js +1 -1
- package/dist/queries/unused-imports.d.ts +2 -2
- package/dist/queries/unused-imports.js +1 -1
- package/dist/queries/unused-params.d.ts +2 -2
- package/dist/queries/unused-params.js +1 -1
- package/dist/queries/vue-component-duplicates.d.ts +2 -2
- package/dist/queries/vue-component-duplicates.js +1 -1
- package/dist/queries/vue-composable-candidates.d.ts +2 -2
- package/dist/queries/vue-composable-candidates.js +1 -1
- package/dist/queries/vue-large-view-pressure.d.ts +2 -2
- package/dist/queries/vue-large-view-pressure.js +1 -1
- package/dist/queries/wrapper-candidates.d.ts +2 -2
- package/dist/queries/wrapper-candidates.js +1 -1
- package/dist/reindex-worker.js +23 -24
- package/dist/reindex.d.ts +10 -4
- package/dist/reindex.js +33 -38
- package/dist/runtime.d.ts +167 -11
- package/dist/runtime.js +3 -2
- package/dist/rust-semantic-session-server.js +1 -1
- package/dist/rust-semantic-session-worker.js +1 -1
- package/dist/rust-semantic-worker.js +1 -1
- package/dist/{scip-cli-kRpaexVJ.d.ts → scip-cli-DCvnlZCu.d.ts} +5 -1
- package/dist/watch-server.js +5 -5
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/AI_FAILURE_MODES.md +18 -18
- package/docs/API_EVOLUTION.md +71 -0
- package/docs/CLI_JSON_OUTPUT.md +83 -0
- package/docs/COMMAND_REFERENCE.md +10 -8
- package/docs/COMMITTED_RECORD_COMPATIBILITY.md +117 -0
- package/docs/CONFIGURATION_WRITE_SAFETY.md +130 -0
- package/docs/DETECTOR_GUIDE.md +47 -47
- package/docs/DURABILITY.md +103 -0
- package/docs/INDEX_GENERATIONS.md +121 -0
- package/docs/LOCK_PROTOCOL.md +133 -0
- package/docs/MAILBOX_LIFECYCLE.md +197 -0
- package/docs/REINDEX_METADATA_COMPATIBILITY.md +84 -0
- package/docs/RUST_DURABLE_SESSION_PROTOCOL.md +126 -0
- package/docs/TELEMETRY_RETENTION.md +72 -0
- package/docs/TIME_SEMANTICS.md +77 -0
- package/docs/WATCH_REFRESH_REQUESTS.md +110 -0
- package/docs/WINDOWS_SIDECAR_RELEASE.md +298 -0
- package/docs/analyzer-validation-ledger.md +24 -23
- package/docs/schemas/cli-json-envelope.schema.json +53 -0
- package/docs/schemas/npm-release-state.schema.json +146 -0
- package/docs/schemas/outcome-event-record.schema.json +39 -0
- package/docs/schemas/project-config.schema.json +247 -0
- package/docs/schemas/suppression-record.schema.json +31 -0
- package/docs/schemas/windows-sidecar-provenance.schema.json +137 -0
- package/package.json +15 -5
- package/scripts/build-scip-windows.mjs +180 -61
- package/scripts/scip-windows-provenance.mjs +364 -0
- package/scripts/verify-scip-windows.mjs +29 -0
- package/skills/_shared/SKILL.md +91 -242
- package/skills/_shared/agents/openai.yaml +1 -1
- package/skills/_shared/references/agent-contract-catalog.md +105 -0
- package/skills/_shared/references/command-catalog.md +118 -0
- package/skills/_shared/references/detector-precision-and-diffgate.md +59 -0
- package/skills/_shared/references/evidence-and-dead-code.md +25 -0
- package/skills/scip-audit/SKILL.md +76 -0
- package/skills/scip-audit/agents/openai.yaml +4 -0
- package/skills/scip-audit/references/claims.md +98 -0
- package/skills/scip-audit/references/cleanup.md +101 -0
- package/skills/scip-audit/references/directory.md +222 -0
- package/skills/scip-audit/references/frontend.md +130 -0
- package/skills/scip-audit/references/integrity.md +154 -0
- package/skills/scip-audit/references/maintainability.md +162 -0
- package/skills/scip-audit/references/twin-drift.md +104 -0
- package/skills/scip-diagnose/SKILL.md +52 -0
- package/skills/scip-diagnose/agents/openai.yaml +4 -0
- package/skills/scip-diagnose/references/debug.md +117 -0
- package/skills/{scip-probe-reachability/SKILL.md → scip-diagnose/references/probe-reachability.md} +12 -27
- package/skills/scip-diagnose/references/root-cause.md +145 -0
- package/skills/scip-diagnose/references/triage.md +119 -0
- package/skills/scip-explore/SKILL.md +53 -84
- package/skills/scip-explore/agents/openai.yaml +2 -2
- package/skills/scip-explore/references/diagrams.md +40 -0
- package/skills/scip-explore/references/language-playbook.md +49 -0
- package/skills/scip-improve/SKILL.md +56 -0
- package/skills/scip-improve/agents/openai.yaml +4 -0
- package/skills/scip-improve/references/cleanup-batches.md +53 -0
- package/skills/scip-improve/references/directory-moves.md +53 -0
- package/skills/scip-improve/references/doc-reconcile.md +30 -0
- package/skills/scip-improve/references/frontend-extraction.md +39 -0
- package/skills/scip-improve/references/maintainability-mechanism.md +43 -0
- package/skills/scip-improve/references/twin-drift.md +35 -0
- package/skills/scip-plan/SKILL.md +68 -0
- package/skills/scip-plan/agents/openai.yaml +4 -0
- package/skills/scip-plan/references/api-impact.md +19 -0
- package/skills/scip-plan/references/conductor.md +41 -0
- package/skills/scip-plan/references/high-assurance.md +43 -0
- package/skills/scip-plan/references/hyper-optimization.md +50 -0
- package/skills/scip-plan/references/tla-model.md +88 -0
- package/skills/scip-query/SKILL.md +52 -97
- package/skills/scip-query/agents/openai.yaml +2 -2
- package/skills/scip-setup/SKILL.md +65 -176
- package/skills/scip-setup/agents/openai.yaml +3 -3
- package/skills/scip-setup/references/bootstrap-workflow.md +120 -0
- package/skills/scip-setup/references/language-verification.md +61 -0
- package/skills/scip-setup/references/lifecycle-commands.md +119 -0
- package/skills/scip-setup/references/per-repo-triage.md +24 -0
- package/skills/scip-verify/SKILL.md +123 -70
- package/skills/scip-verify/agents/openai.yaml +2 -2
- package/skills/scip-verify/references/calibrate-detectors.md +170 -0
- package/dist/chunk-2CTX5CMX.js +0 -4
- package/dist/chunk-2Y373BDD.js +0 -2
- package/dist/chunk-C2QSK7E7.js +0 -2
- package/dist/chunk-D4U5Q3FT.js +0 -7
- package/dist/chunk-K2ERX4UT.js +0 -3
- package/dist/chunk-KHE7J5ZN.js +0 -3
- package/dist/chunk-L7SPDE73.js +0 -84
- package/dist/chunk-LHMNRHGV.js +0 -3
- package/dist/chunk-LM72NQ7T.js +0 -3
- package/dist/chunk-MSWVMDAH.js +0 -122
- package/dist/chunk-NH7WNNQC.js +0 -20
- package/dist/chunk-OMPZHGHO.js +0 -2
- package/dist/chunk-SVLTAG5O.js +0 -927
- package/dist/chunk-U7DSEKOM.js +0 -30
- package/dist/chunk-V27BEQJN.js +0 -7
- package/dist/chunk-VMNZB6WI.js +0 -4
- package/dist/chunk-XBN5VO53.js +0 -2
- package/dist/chunk-ZAIILQNP.js +0 -5
- package/dist/command-descriptors-MFU4BCJ7.js +0 -612
- package/dist/direct-navigation-MRMQFIRB.js +0 -3
- package/skills/scip-api-impact/SKILL.md +0 -139
- package/skills/scip-api-impact/agents/openai.yaml +0 -4
- package/skills/scip-calibrate/SKILL.md +0 -131
- package/skills/scip-calibrate/agents/openai.yaml +0 -4
- package/skills/scip-claim-audit/SKILL.md +0 -106
- package/skills/scip-claim-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-audit/SKILL.md +0 -126
- package/skills/scip-cleanup-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-improve/SKILL.md +0 -84
- package/skills/scip-cleanup-improve/agents/openai.yaml +0 -4
- package/skills/scip-concrete-plan/SKILL.md +0 -262
- package/skills/scip-concrete-plan/agents/openai.yaml +0 -4
- package/skills/scip-conductor/SKILL.md +0 -133
- package/skills/scip-conductor/agents/openai.yaml +0 -4
- package/skills/scip-debug/SKILL.md +0 -130
- package/skills/scip-debug/agents/openai.yaml +0 -4
- package/skills/scip-diagram/SKILL.md +0 -110
- package/skills/scip-diagram/agents/openai.yaml +0 -4
- package/skills/scip-directory-architecture/SKILL.md +0 -254
- package/skills/scip-directory-architecture/agents/openai.yaml +0 -4
- package/skills/scip-doc-reconcile/SKILL.md +0 -89
- package/skills/scip-doc-reconcile/agents/openai.yaml +0 -4
- package/skills/scip-hyper-optimization/SKILL.md +0 -156
- package/skills/scip-hyper-optimization/agents/openai.yaml +0 -4
- package/skills/scip-integrity-audit/SKILL.md +0 -152
- package/skills/scip-integrity-audit/agents/openai.yaml +0 -4
- package/skills/scip-language-playbook/SKILL.md +0 -106
- package/skills/scip-language-playbook/agents/openai.yaml +0 -4
- package/skills/scip-maintainability/SKILL.md +0 -158
- package/skills/scip-maintainability/agents/openai.yaml +0 -4
- package/skills/scip-probe-reachability/agents/openai.yaml +0 -4
- package/skills/scip-react-maintainability/SKILL.md +0 -101
- package/skills/scip-react-maintainability/agents/openai.yaml +0 -4
- package/skills/scip-root-cause/SKILL.md +0 -150
- package/skills/scip-root-cause/agents/openai.yaml +0 -4
- package/skills/scip-tla-model-system/SKILL.md +0 -148
- package/skills/scip-tla-model-system/agents/openai.yaml +0 -4
- package/skills/scip-triage-issue/SKILL.md +0 -126
- package/skills/scip-triage-issue/agents/openai.yaml +0 -4
- package/skills/scip-twin-drift/SKILL.md +0 -107
- package/skills/scip-twin-drift/agents/openai.yaml +0 -4
- package/skills/scip-vue-maintainability/SKILL.md +0 -107
- package/skills/scip-vue-maintainability/agents/openai.yaml +0 -4
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Filesystem Publication and Durability
|
|
2
|
+
|
|
3
|
+
This document classifies scip-query's file-backed state by the guarantee a
|
|
4
|
+
writer must provide. The classification is part of the storage contract: a
|
|
5
|
+
caller must choose a writer whose failure semantics match the record's role.
|
|
6
|
+
|
|
7
|
+
## Guarantees
|
|
8
|
+
|
|
9
|
+
A **visibility-atomic replacement** is a filesystem publication operation that
|
|
10
|
+
writes complete bytes to a private staging file and renames that file over the
|
|
11
|
+
target. The rename is the decisive characteristic: concurrent readers can
|
|
12
|
+
observe the old complete file or the new complete file, but never the
|
|
13
|
+
writer's partial staging bytes. It does not promise that the new bytes or
|
|
14
|
+
directory entry survive power loss.
|
|
15
|
+
|
|
16
|
+
A **crash-durable replacement** is a visibility-atomic replacement that also
|
|
17
|
+
flushes the complete staging file before rename and flushes the containing
|
|
18
|
+
directory after rename. Those ordered flushes are what make acknowledged file
|
|
19
|
+
contents and the name that reaches them recoverable after an operating-system
|
|
20
|
+
or machine crash, subject to the host filesystem and device honoring their
|
|
21
|
+
flush contract.
|
|
22
|
+
|
|
23
|
+
An **authoritative record** is file-backed state whose loss can change which
|
|
24
|
+
generation, owner, policy, or accepted decision the program treats as current.
|
|
25
|
+
Its causal role in choosing later behavior makes silent rollback unsafe, so it
|
|
26
|
+
uses crash-durable replacement.
|
|
27
|
+
|
|
28
|
+
A **rebuildable record** is file-backed state whose loss can cost time,
|
|
29
|
+
diagnostics, or a retry but cannot make unverified facts authoritative. Because
|
|
30
|
+
another computation or bounded request can reconstruct it, complete
|
|
31
|
+
old-or-new visibility is sufficient.
|
|
32
|
+
|
|
33
|
+
A **directory flush** is a request to persist a directory entry—the mapping
|
|
34
|
+
from a filename to its file—after the file itself has been flushed. Flushing
|
|
35
|
+
only file contents is insufficient because a crash can otherwise lose the
|
|
36
|
+
rename that made those contents current.
|
|
37
|
+
|
|
38
|
+
## APIs
|
|
39
|
+
|
|
40
|
+
| API | Staging identity | File flush | Rename | Parent-directory flush |
|
|
41
|
+
| --- | --- | --- | --- | --- |
|
|
42
|
+
| `writeJsonAtomic` / `replaceFileAtomic(..., { durability: "visibility" })` | Exclusive random token | No | Yes | No |
|
|
43
|
+
| `writeJsonDurable` / `replaceFileAtomic(..., { durability: "durable" })` | Exclusive random token | Yes | Yes | Yes where supported |
|
|
44
|
+
|
|
45
|
+
`writeJsonAtomic` retains its original `void` return contract for compatibility.
|
|
46
|
+
`writeJsonDurable` and `replaceFileAtomic` return the achieved directory-sync
|
|
47
|
+
status. Verified binary installation owns an equivalent platform-local
|
|
48
|
+
flush/rename sequence because the enforced architecture forbids dependencies
|
|
49
|
+
between the sibling `platform` and `storage` boundaries.
|
|
50
|
+
|
|
51
|
+
On Windows, Node can reject attempts to open or flush a directory handle.
|
|
52
|
+
Known Windows "directory handles unsupported" errors produce
|
|
53
|
+
`directorySync: "unsupported"` after the staged file itself has been flushed
|
|
54
|
+
and renamed. That result means complete visibility plus flushed file contents,
|
|
55
|
+
not the full POSIX directory-entry durability guarantee. Other directory-sync
|
|
56
|
+
errors remain failures.
|
|
57
|
+
|
|
58
|
+
## Failure Outcomes
|
|
59
|
+
|
|
60
|
+
| Failure point | Target visible after return/throw | Owned staging file |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| Exclusive create | Previous target | No owned file was created |
|
|
63
|
+
| Write or short/invalid progress | Previous target | Closed and removed |
|
|
64
|
+
| File flush | Previous target | Closed and removed |
|
|
65
|
+
| Rename | Previous target | Removed by the writer |
|
|
66
|
+
| POSIX directory flush | New complete target; durability unconfirmed and the call throws | Already renamed; no staging path |
|
|
67
|
+
| Unsupported Windows directory flush | New complete target; result reports the limitation | Already renamed; no staging path |
|
|
68
|
+
|
|
69
|
+
The post-rename failure row is deliberately explicit. Once rename succeeds,
|
|
70
|
+
rolling back would be another publication with its own crash window. The
|
|
71
|
+
writer therefore leaves the verified new value visible and reports that it
|
|
72
|
+
could not confirm the stronger durability guarantee.
|
|
73
|
+
|
|
74
|
+
## Call-Site Classification
|
|
75
|
+
|
|
76
|
+
| Record | Contract | Reason |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| Reindex `meta.json` | Durable | Names the accepted index status, fingerprint, and generation metadata |
|
|
79
|
+
| SQLite generation manifest and `state.json` | Durable | Flushes one complete immutable artifact set, then atomically selects it for new readers |
|
|
80
|
+
| Shared-generation manifest | Durable file within staging | Authenticates immutable artifacts; the later generation-directory publication remains a separate generation-store operation |
|
|
81
|
+
| Worktree lease and local cache pointer | Durable | Protect generations from collection and bind a worktree to repository cache identity; generation changes, liveness touches, and cleanup serialize through the repository-cache lock |
|
|
82
|
+
| Watch service state | Durable | Publishes the process instance and index generation accepted as current |
|
|
83
|
+
| Rust semantic session `server.json` | Durable | Publishes the live server process and mailbox identity |
|
|
84
|
+
| Project `.scipquery.json` | Durable | Controls indexing, watch, architecture, and detector policy; versioned reads reject unsupported meaning before use, and authorized writes migrate legacy bytes without dropping unknown fields |
|
|
85
|
+
| Codex/Claude hook JSON | Durable | Controls whether and when agent hooks execute |
|
|
86
|
+
| Structured suppression file | Durable | Records an accepted finding and its reason |
|
|
87
|
+
| Health baseline | Durable | Acts as a committed regression policy |
|
|
88
|
+
| Verified binary cache promotion | Durable | Makes checksum-accepted executable or tool bytes current |
|
|
89
|
+
| TypeScript/Rust request and response mailboxes | Visibility-atomic | A timeout or retry reconstructs the ephemeral message |
|
|
90
|
+
| Watch activity | Visibility-atomic | A newer timestamp supersedes an older idle-lifetime observation; it carries no durable intent |
|
|
91
|
+
| Watch refresh request, claim, and completion records | Durable immutable admission and acknowledgement | Accepted intent survives activity replacement and owner crashes; exclusive claims may be recovered only by the next lock owner |
|
|
92
|
+
| TypeScript fragment/overlay manifests | Visibility-atomic | Content-addressed cache artifacts are validated and rebuildable |
|
|
93
|
+
| Repository GC state | Visibility-atomic | Sweep history can be reconstructed conservatively |
|
|
94
|
+
| Affected-set shadow latest record | Visibility-atomic | Calibration telemetry does not control publication |
|
|
95
|
+
|
|
96
|
+
Process locks use exclusive descriptor creation rather than replacement. Their
|
|
97
|
+
durable token ownership, malformed-creation grace, guarded recovery, and
|
|
98
|
+
legacy compatibility are defined in
|
|
99
|
+
[Process Lock Ownership and Recovery](LOCK_PROTOCOL.md). Generation directories,
|
|
100
|
+
stable compatibility mirrors, and their crash ordering are defined in
|
|
101
|
+
[Local Index Generations](INDEX_GENERATIONS.md). Durable watch demand,
|
|
102
|
+
idempotency, claim recovery, and acknowledgement ordering are defined in
|
|
103
|
+
[Watch Refresh Requests](WATCH_REFRESH_REQUESTS.md).
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
# Local Index Generations
|
|
2
|
+
|
|
3
|
+
`scip-query` treats `index.db`, `index.scip`, and `meta.json` as one local
|
|
4
|
+
index generation. A local index generation is an accepted set of compiler
|
|
5
|
+
artifacts whose database rows, SCIP occurrences, and metadata describe the
|
|
6
|
+
same indexing result. Keeping those files associated is what lets a query
|
|
7
|
+
attach one truthful identity to every row and downstream semantic request.
|
|
8
|
+
|
|
9
|
+
A generation handle is the storage-owned reference retained by one
|
|
10
|
+
`ScipDatabase`. It differs from a group of cache paths by resolving the
|
|
11
|
+
published pointer once, opening the database beneath that immutable
|
|
12
|
+
generation directory, and retaining the corresponding metadata bytes and SCIP
|
|
13
|
+
path for the connection's entire lifetime.
|
|
14
|
+
|
|
15
|
+
## Layout
|
|
16
|
+
|
|
17
|
+
The worktree cache keeps this internal layout:
|
|
18
|
+
|
|
19
|
+
```text
|
|
20
|
+
<cache>/
|
|
21
|
+
index.db compatibility mirror
|
|
22
|
+
index.scip compatibility mirror
|
|
23
|
+
meta.json compatibility mirror
|
|
24
|
+
.scipquery-generations/
|
|
25
|
+
state.json atomic current-generation pointer
|
|
26
|
+
<generation-sha256>/
|
|
27
|
+
manifest.json
|
|
28
|
+
index.db
|
|
29
|
+
index.scip
|
|
30
|
+
meta.json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The files inside a named generation directory are immutable. The SHA-256
|
|
34
|
+
identity incorporates the database bytes, SCIP bytes when present, and the
|
|
35
|
+
generation-bearing metadata fields. `manifest.json` records the exact size and
|
|
36
|
+
digest of each stored artifact. `state.json` names the accepted directory and
|
|
37
|
+
is the only publication decision read by internal database consumers.
|
|
38
|
+
|
|
39
|
+
The top-level files remain for the SCIP CLI, indexers, older scip-query
|
|
40
|
+
versions, and external inspection. They are derived mirrors, not the internal
|
|
41
|
+
read authority. A current scip-query process never combines rows from a
|
|
42
|
+
generation directory with metadata or SCIP bytes freshly reread through those
|
|
43
|
+
replaceable paths.
|
|
44
|
+
|
|
45
|
+
## Publication and crash behavior
|
|
46
|
+
|
|
47
|
+
Publication proceeds in this order:
|
|
48
|
+
|
|
49
|
+
1. Retain the previously published stable artifacts as an immutable
|
|
50
|
+
generation when upgrading a legacy cache.
|
|
51
|
+
2. Copy-on-write clone or copy every accepted candidate artifact into a
|
|
52
|
+
private staging directory.
|
|
53
|
+
3. Flush the artifact files and manifest, rename the complete staging
|
|
54
|
+
directory into its content-derived identity, and flush the generation
|
|
55
|
+
directory entry.
|
|
56
|
+
4. Durably replace `state.json` so new internal readers select the complete
|
|
57
|
+
new directory.
|
|
58
|
+
5. Replace the three compatibility mirrors and durably record their file
|
|
59
|
+
identities for drift diagnostics.
|
|
60
|
+
|
|
61
|
+
A crash before step 4 leaves the prior pointer authoritative. A crash after
|
|
62
|
+
step 4 leaves the new immutable generation authoritative even if one or more
|
|
63
|
+
compatibility mirrors are old. `scip-query status` and freshness inspection
|
|
64
|
+
report that mirror drift and a later refresh repairs it; database-backed
|
|
65
|
+
queries remain generation-consistent throughout.
|
|
66
|
+
|
|
67
|
+
Metadata-only refreshes create a new immutable generation and switch the same
|
|
68
|
+
pointer. Old database handles retain their old metadata bytes. Result cursors
|
|
69
|
+
and TypeScript semantic mailbox requests carry the handle identity, so a
|
|
70
|
+
continuation or numeric symbol identifier from an older generation is rejected
|
|
71
|
+
when a service has moved to a newer one.
|
|
72
|
+
|
|
73
|
+
Mailbox protocol version 3 additionally binds that generation identity into a
|
|
74
|
+
content-derived logical-operation key. The deterministic request ID lets a
|
|
75
|
+
retry join an already pending, inflight, or retained completed operation,
|
|
76
|
+
while the service still recomputes the key and rejects a path, payload, or
|
|
77
|
+
generation mismatch. See
|
|
78
|
+
[`MAILBOX_LIFECYCLE.md`](MAILBOX_LIFECYCLE.md) for ownership, expiry, limits,
|
|
79
|
+
and legacy overlap.
|
|
80
|
+
|
|
81
|
+
## Legacy overlap and retention
|
|
82
|
+
|
|
83
|
+
A cache without `state.json` remains readable through a bounded legacy
|
|
84
|
+
open-and-file-identity recheck. A state record written by the earlier local
|
|
85
|
+
generation implementation, which did not name an immutable artifact set, also
|
|
86
|
+
uses this compatibility path. New publications upgrade either layout without
|
|
87
|
+
deleting the stable files.
|
|
88
|
+
|
|
89
|
+
Published local generation directories are retained conservatively. Automatic
|
|
90
|
+
collection is intentionally disabled until a cross-process reader lease can
|
|
91
|
+
prove that no surviving handle can later need the retained SCIP companion.
|
|
92
|
+
This can temporarily consume more cache space, but it preserves the stronger
|
|
93
|
+
rule that storage reclamation may never change or remove evidence owned by a
|
|
94
|
+
live query.
|
|
95
|
+
|
|
96
|
+
The repository-wide shared generation store is a separate cache layer. It
|
|
97
|
+
warms a worktree by copying a complete generation into the worktree's private
|
|
98
|
+
cache; the local publisher then creates the local immutable directory and
|
|
99
|
+
pointer described here. Later worktree writes cannot mutate either the shared
|
|
100
|
+
source or a retained local reader.
|
|
101
|
+
|
|
102
|
+
## Shared worktree lease invariant
|
|
103
|
+
|
|
104
|
+
A worktree lease is a repository-cache reachability record whose generation
|
|
105
|
+
IDs keep an immutable shared generation from collection while that worktree
|
|
106
|
+
uses it. Its essential ownership fields bind the repository, worktree,
|
|
107
|
+
project path, and local cache path through a checksum; `lastSeenAt` is only a
|
|
108
|
+
liveness observation.
|
|
109
|
+
|
|
110
|
+
Generation attachment, lease liveness touches, and repository cleanup
|
|
111
|
+
serialize through one repository-cache lock. A touch may inspect the local
|
|
112
|
+
pointer before waiting only to identify that lock. Once it owns the lock, it
|
|
113
|
+
rereads the pointer and lease, validates the ownership checksum, current Git
|
|
114
|
+
tree, local metadata fingerprint, generation IDs, and source artifacts, then
|
|
115
|
+
merges only a newer `lastSeenAt`. It never writes a lease assembled from the
|
|
116
|
+
pre-lock observation.
|
|
117
|
+
|
|
118
|
+
Consequently, a touch waiting behind a new generation attaches to or rejects
|
|
119
|
+
the new lease; it cannot restore the old generation. A deleted lease stays
|
|
120
|
+
deleted, a recreated lease with different ownership stays intact, and a touch
|
|
121
|
+
whose clock is behind another completed touch cannot move liveness backward.
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Process Lock Ownership and Recovery
|
|
2
|
+
|
|
3
|
+
scip-query uses one process-lock protocol for watch ownership, reindex
|
|
4
|
+
publication, repository-cache garbage collection, shared-generation builds,
|
|
5
|
+
verified-binary fetches, and the durable Rust semantic server.
|
|
6
|
+
|
|
7
|
+
A **process lock** is a filesystem ownership record created exclusively at one
|
|
8
|
+
resource path. Exclusive creation makes competing processes observe one
|
|
9
|
+
winner; the recorded random token and operating-system process-start identity
|
|
10
|
+
distinguish that winner from later processes and later lock records that reuse
|
|
11
|
+
the same PID or pathname.
|
|
12
|
+
|
|
13
|
+
A **process instance** is one execution occupying an operating-system PID
|
|
14
|
+
slot. The PID locates the slot, while the process-start identity distinguishes
|
|
15
|
+
successive executions that occupy it. A PID by itself is therefore accepted
|
|
16
|
+
for conservative legacy inspection but never treated as proof that a live
|
|
17
|
+
process is the original owner.
|
|
18
|
+
|
|
19
|
+
A **reclaim guard** is a second exclusive, token-owned process lock at
|
|
20
|
+
`<lock>.reclaim`. It serializes recovery attempts so that only one process may
|
|
21
|
+
remove an unchanged abandoned record. The guard does not make an ambiguous
|
|
22
|
+
live owner safe to remove.
|
|
23
|
+
|
|
24
|
+
## Current Record
|
|
25
|
+
|
|
26
|
+
New writers emit protocol version 1:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"protocol": "scip-query-process-lock",
|
|
31
|
+
"version": 1,
|
|
32
|
+
"kind": "reindex",
|
|
33
|
+
"pid": 41001,
|
|
34
|
+
"token": "random-owner-token",
|
|
35
|
+
"processIdentity": {
|
|
36
|
+
"version": 1,
|
|
37
|
+
"pid": 41001,
|
|
38
|
+
"platform": "linux",
|
|
39
|
+
"startToken": "9147752"
|
|
40
|
+
},
|
|
41
|
+
"startedAt": "2026-07-25T19:00:00.000Z",
|
|
42
|
+
"detail": {
|
|
43
|
+
"projectRoot": "/repo"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`kind` identifies the resource protocol using the lock. `detail` carries only
|
|
49
|
+
that protocol's diagnostic metadata; it is not ownership evidence. Ownership
|
|
50
|
+
is the combination of PID, random token, and process identity when the host can
|
|
51
|
+
obtain one.
|
|
52
|
+
|
|
53
|
+
The creator writes the complete record to a token-unique private candidate,
|
|
54
|
+
flushes and closes that candidate, then publishes the complete inode under the
|
|
55
|
+
public lock name with an exclusive hard link. The link either creates the
|
|
56
|
+
public name or reports that another owner already has it; it never replaces an
|
|
57
|
+
owner. A crash before the link can leave a private candidate, but it cannot
|
|
58
|
+
expose an empty or truncated public lock. Successful publication removes the
|
|
59
|
+
private name and flushes the containing directory where supported.
|
|
60
|
+
|
|
61
|
+
## Observation and Recovery
|
|
62
|
+
|
|
63
|
+
| Observed state | Recovery decision |
|
|
64
|
+
| ------------------------------------------------------------------ | ----------------------------------------------------------------------- |
|
|
65
|
+
| Current record; process instance is live and matches | Contended; never remove |
|
|
66
|
+
| Current record; PID is dead | Reclaim after guarded unchanged recheck |
|
|
67
|
+
| Current record; PID is live but its process-start identity differs | Reclaim the old record without signaling the new PID occupant |
|
|
68
|
+
| Current record; PID is live but identity cannot be read | Contended; fail closed |
|
|
69
|
+
| Supported legacy record; PID is live | Contended because the process instance cannot be verified |
|
|
70
|
+
| Supported legacy record; PID is dead | Reclaim after guarded unchanged recheck |
|
|
71
|
+
| Empty, truncated, or malformed public record | Contended; fail closed because civil-clock age cannot identify an owner |
|
|
72
|
+
| Record changes before the guarded recheck | Do not remove; report contention |
|
|
73
|
+
| Empty or malformed reclaim guard | Do not remove |
|
|
74
|
+
| Valid reclaim guard whose process instance is dead | Recover the guard, then retry once |
|
|
75
|
+
|
|
76
|
+
The unchanged recheck compares the original bytes, device, inode, size, and
|
|
77
|
+
modification time. Recovery is limited to one retry: persistent ambiguity
|
|
78
|
+
remains contention instead of becoming an unbounded delete loop.
|
|
79
|
+
|
|
80
|
+
Malformed public records from a legacy writer, external damage, or manual
|
|
81
|
+
editing require operator review. A civil timestamp is not causal ownership
|
|
82
|
+
evidence: moving the system clock forward cannot prove which process created
|
|
83
|
+
the bytes or whether that process still owns the resource.
|
|
84
|
+
|
|
85
|
+
## Release
|
|
86
|
+
|
|
87
|
+
Release rereads the current record and removes it only when PID and token still
|
|
88
|
+
match the owner's retained record. When the owner recorded a process identity,
|
|
89
|
+
that identity must match as well. A missing path, malformed record, legacy
|
|
90
|
+
record, token mismatch, or successor record makes release a no-op. Successful
|
|
91
|
+
removal flushes the containing directory where supported so an acknowledged
|
|
92
|
+
release does not resurrect the prior directory entry after a crash.
|
|
93
|
+
|
|
94
|
+
This protocol does not expire live ownership and therefore does not require a
|
|
95
|
+
monotonically increasing fencing token. A **fencing token** is an ordered
|
|
96
|
+
ownership value checked by the protected resource before it accepts a write;
|
|
97
|
+
it is necessary when an old live owner can outlast a lease and attempt
|
|
98
|
+
publication after a newer owner. scip-query instead refuses to steal a
|
|
99
|
+
verifiably live lock.
|
|
100
|
+
|
|
101
|
+
## Legacy Compatibility
|
|
102
|
+
|
|
103
|
+
Readers retain narrow decoders for the prior formats:
|
|
104
|
+
|
|
105
|
+
- watch and reindex JSON ownership records;
|
|
106
|
+
- generic repository-cache and shared-build `{ "pid": ... }` records;
|
|
107
|
+
- the durable Rust semantic server's numeric PID record.
|
|
108
|
+
|
|
109
|
+
New writers always emit the current common format. A live legacy owner remains
|
|
110
|
+
contended because its process instance cannot be proven. A dead legacy owner
|
|
111
|
+
can be reclaimed. Unsupported or malformed JSON is never guessed into a
|
|
112
|
+
legacy owner.
|
|
113
|
+
|
|
114
|
+
## Diagnostics and Manual Recovery
|
|
115
|
+
|
|
116
|
+
Successful reindex recovery reports that it recovered an abandoned lock. A
|
|
117
|
+
manual refresh that encounters an already-stale
|
|
118
|
+
watcher-owned reindex record retains the existing “preempting watcher refresh”
|
|
119
|
+
diagnostic while stating that the prior owner was already stale.
|
|
120
|
+
|
|
121
|
+
For other lock users, normal recovery is silent and contention reports the
|
|
122
|
+
resource-specific lock path. If a lock remains contended:
|
|
123
|
+
|
|
124
|
+
1. inspect the JSON without editing it;
|
|
125
|
+
2. verify whether its PID and process-start identity name the current process;
|
|
126
|
+
3. for a malformed record, establish ownership outside scip-query and move the
|
|
127
|
+
record aside rather than asking wall-clock age to authorize deletion;
|
|
128
|
+
4. retry the operation so the guarded recovery path can run for attributable
|
|
129
|
+
dead owners.
|
|
130
|
+
|
|
131
|
+
Do not manually delete a valid lock whose process instance is live. If host
|
|
132
|
+
permissions prevent process-identity verification, stop the owning process or
|
|
133
|
+
move the record aside only after establishing ownership outside scip-query.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Filesystem mailbox lifecycle
|
|
2
|
+
|
|
3
|
+
scip-query uses three local filesystem mailboxes to carry work between a
|
|
4
|
+
synchronous CLI process and a reusable service process:
|
|
5
|
+
|
|
6
|
+
- TypeScript semantic queries sent to the watch service;
|
|
7
|
+
- TypeScript document-emission requests sent to the watch service; and
|
|
8
|
+
- Rust semantic queries sent to the durable rust-analyzer helper.
|
|
9
|
+
|
|
10
|
+
A filesystem mailbox is a process-coordination queue whose units are complete
|
|
11
|
+
files and whose essential safety property is that each accepted logical
|
|
12
|
+
operation has one durable identity and one inspectable lifecycle across
|
|
13
|
+
process failure. It differs from an arbitrary request directory because
|
|
14
|
+
admission, ownership transfer, completion, expiry, and retention are explicit
|
|
15
|
+
states rather than consequences of whichever process happens to delete a
|
|
16
|
+
file.
|
|
17
|
+
|
|
18
|
+
A logical operation is a requested computation identified by the SHA-256 of
|
|
19
|
+
its answer-affecting protocol payload. That stable content identity is what
|
|
20
|
+
makes two independently attempted requests units of the same operation:
|
|
21
|
+
retries converge on one pending request, one inflight claim, or one retained
|
|
22
|
+
completion instead of executing under unrelated random IDs. `clientId`
|
|
23
|
+
identifies the attempt that first published the operation; it does not change
|
|
24
|
+
the operation's meaning.
|
|
25
|
+
|
|
26
|
+
## Layout and states
|
|
27
|
+
|
|
28
|
+
Each mailbox root has this layout:
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
<mailbox>/
|
|
32
|
+
pending/
|
|
33
|
+
inflight/<encoded-owner>/
|
|
34
|
+
.owner.json # process-instance evidence for claim recovery
|
|
35
|
+
responses/
|
|
36
|
+
dead-letter/
|
|
37
|
+
requests/ # legacy v2 overlap reads only
|
|
38
|
+
.admission.lock # complete, exclusively published quota coordinator
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
| State | Real file state | Authority and transition |
|
|
42
|
+
| --------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
|
|
43
|
+
| Pending | `pending/<operation-id>.json` | The immutable request was admitted but no service owns it. |
|
|
44
|
+
| Inflight | `inflight/<owner>/<request>.<claim-expiry>.claim` plus `.owner.json` | Atomic rename transferred this request to one recorded process instance for a bounded lease. |
|
|
45
|
+
| Completed | `responses/<operation-id>.json` | A response was durably and exclusively published before claim release. |
|
|
46
|
+
| Rejected | Error response, with a bounded record under `dead-letter/` when capacity permits | The service explicitly refused malformed, expired, oversized, mismatched, or failed work. |
|
|
47
|
+
| Expired | Deadline has passed; the next bounded service batch rejects and collects it | Expiry prevents abandoned requests from authorizing expensive work indefinitely. |
|
|
48
|
+
|
|
49
|
+
The `requests/` directory is not a second current queue. It exists so a new
|
|
50
|
+
service can drain flat requests left by protocol v2. Current writers publish
|
|
51
|
+
only to `pending/`; no migration renames or deletes legacy data pre-emptively.
|
|
52
|
+
|
|
53
|
+
## Identity and protocol fields
|
|
54
|
+
|
|
55
|
+
Every current request contains:
|
|
56
|
+
|
|
57
|
+
- `mailboxVersion`, which versions the shared lifecycle fields;
|
|
58
|
+
- the domain protocol version;
|
|
59
|
+
- `operationKey`, the full SHA-256 logical-operation identity;
|
|
60
|
+
- `id`, deterministically derived as `op-<operationKey>`;
|
|
61
|
+
- `clientId`, the publishing attempt identity;
|
|
62
|
+
- `enqueuedAtMs` and `deadlineAtMs`; and
|
|
63
|
+
- the domain request plus its generation/session identity.
|
|
64
|
+
|
|
65
|
+
The TypeScript semantic and TypeScript index protocols are version 3. The Rust
|
|
66
|
+
durable-session protocol is also version 3. Current readers recompute the
|
|
67
|
+
operation key, require the ID derived from it, and retain the existing
|
|
68
|
+
generation/base-generation response checks. TypeScript services accept the
|
|
69
|
+
supported flat version-2 request shape during the overlap window. The Rust
|
|
70
|
+
service accepts its former unversioned `{id, request}` shape and the
|
|
71
|
+
immediately prior v3 envelope without a mailbox-session identity; an
|
|
72
|
+
explicitly versioned unknown Rust envelope is not treated as legacy.
|
|
73
|
+
|
|
74
|
+
Responses repeat the domain protocol, request ID, operation key, completion
|
|
75
|
+
time, authoritative request deadline, and retention expiry. The first
|
|
76
|
+
response published for an operation is authoritative. An old owner that
|
|
77
|
+
finishes after its lease was reclaimed cannot replace a newer response.
|
|
78
|
+
Duplicate admission returns the deadline from that authoritative pending,
|
|
79
|
+
inflight, or completed record, so a retry cannot relabel retained work with a
|
|
80
|
+
new time identity. Rust responses additionally echo the mailbox-session
|
|
81
|
+
identity and are accepted only when protocol, request, operation, session, and
|
|
82
|
+
deadline all match. See
|
|
83
|
+
[Durable Rust session protocol](RUST_DURABLE_SESSION_PROTOCOL.md).
|
|
84
|
+
|
|
85
|
+
## Admission and bounds
|
|
86
|
+
|
|
87
|
+
Admission is the act of adding one immutable operation after proving the
|
|
88
|
+
mailbox remains within its retained-resource budget. A short-lived,
|
|
89
|
+
token-checked admission file serializes the count-and-publish decision, which
|
|
90
|
+
prevents two processes from both observing the last free slot and
|
|
91
|
+
oversubscribing it. Its complete owner record is flushed under a private name
|
|
92
|
+
and hard-linked exclusively into the public name; an ownerless or malformed
|
|
93
|
+
public record fails closed and is never deleted from civil-clock age alone.
|
|
94
|
+
|
|
95
|
+
Default bounds are:
|
|
96
|
+
|
|
97
|
+
| Bound | Default |
|
|
98
|
+
| ---------------------------------- | ----------------------------------------------------------: |
|
|
99
|
+
| Retained files per mailbox | 1,024 |
|
|
100
|
+
| Retained bytes per mailbox | 512 MiB |
|
|
101
|
+
| One request or response | 64 MiB |
|
|
102
|
+
| Work claimed per service-loop pass | 16 |
|
|
103
|
+
| Claim lease | 5 minutes, extended through request deadline plus 5 seconds |
|
|
104
|
+
| Response/idempotency retention | 10 minutes |
|
|
105
|
+
| Dead-letter retention | 24 hours |
|
|
106
|
+
| Orphan temporary-file retention | 1 minute |
|
|
107
|
+
| Maintenance actions per pass | 64 |
|
|
108
|
+
|
|
109
|
+
`MailboxBackpressureError` is the typed overload result. Its code distinguishes
|
|
110
|
+
`item-too-large`, `item-capacity`, `byte-capacity`, and `admission-busy`, and
|
|
111
|
+
its status reports the observed retained state and configured limits. A
|
|
112
|
+
duplicate logical operation is checked before capacity rejection, so a retry
|
|
113
|
+
can join work that already owns the last slot.
|
|
114
|
+
|
|
115
|
+
TypeScript semantic callers retain their established correctness fallback:
|
|
116
|
+
service failure or backpressure selects the in-process provider. Index and
|
|
117
|
+
Rust requester errors propagate to their existing higher-level fallback
|
|
118
|
+
boundaries.
|
|
119
|
+
|
|
120
|
+
## Ownership, crash recovery, and replay
|
|
121
|
+
|
|
122
|
+
A claim is a time-bounded service ownership record made real by renaming one
|
|
123
|
+
pending file into an owner-specific inflight directory. Rename is the
|
|
124
|
+
ownership compare-and-set: only the process whose rename succeeds owns that
|
|
125
|
+
file. The directory's owner record binds the random owner ID to a PID and,
|
|
126
|
+
when the operating system exposes it, a process-start identity. A process-start
|
|
127
|
+
identity is the operating-system fact that distinguishes successive
|
|
128
|
+
executions occupying the same numeric PID slot.
|
|
129
|
+
|
|
130
|
+
The recovery rules are:
|
|
131
|
+
|
|
132
|
+
| Failure point | Surviving evidence | Recovery |
|
|
133
|
+
| ----------------------------------------------------- | ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------- |
|
|
134
|
+
| Client exits after admission | Pending file | A later service batch claims it or explicitly expires it. The client does not delete shared work in `finally`. |
|
|
135
|
+
| Service exits before claim | Pending file | Another owner can claim immediately. |
|
|
136
|
+
| Service exits after claim, before response | Inflight file, expiry, and dead process identity | After lease expiry and proof that the recorded process instance is gone, maintenance atomically returns it to pending. |
|
|
137
|
+
| Service publishes response, then exits before release | Response plus inflight file | Maintenance treats the response as completion and removes the stale claim without re-execution. |
|
|
138
|
+
| Old owner finishes after reclamation | Competing exclusive response publication | The first response remains authoritative; the late owner cannot replace it. |
|
|
139
|
+
| Same logical request is retried | Same deterministic operation ID | The caller joins pending/inflight/completed state. |
|
|
140
|
+
| Malformed, expired, or oversized file | Claimed input | The service emits an explicit error response and a bounded rejection record. |
|
|
141
|
+
|
|
142
|
+
These are crash-recoverable claim semantics with first-completion
|
|
143
|
+
idempotency. Civil-clock lease expiry is only a durable recovery hint: it does
|
|
144
|
+
not authorize reclamation while the recorded process instance is live or
|
|
145
|
+
unverifiable. Work can be retried after both lease expiry and owner death. The
|
|
146
|
+
answer-affecting operations are read-only or rebuildable, the response
|
|
147
|
+
identity is stable, and exclusive completion remains a final defense against
|
|
148
|
+
two observable answers.
|
|
149
|
+
|
|
150
|
+
## Fairness and maintenance
|
|
151
|
+
|
|
152
|
+
Pending work is ordered by `enqueuedAtMs`, then stable request identity.
|
|
153
|
+
Legacy and malformed files fall back to filesystem modification time. Random
|
|
154
|
+
UUID filename order no longer determines service priority.
|
|
155
|
+
|
|
156
|
+
Each process call claims at most 16 files, and each maintenance call performs
|
|
157
|
+
at most 64 removals or reclaims. Those caps are what let the watch and Rust
|
|
158
|
+
server loops regain control to update heartbeats, observe stop signals, and
|
|
159
|
+
run unrelated maintenance even when a mailbox was flooded.
|
|
160
|
+
|
|
161
|
+
Maintenance:
|
|
162
|
+
|
|
163
|
+
- reclaims expired inflight ownership only after the recorded process instance
|
|
164
|
+
is dead or its PID has been reused by a different process instance;
|
|
165
|
+
- removes a claim whose response proves it already completed;
|
|
166
|
+
- removes expired responses and dead-letter records;
|
|
167
|
+
- removes abandoned atomic-write staging files after their retention window;
|
|
168
|
+
- preserves non-expired pending and inflight work; and
|
|
169
|
+
- never depends on a client being alive to finish cleanup.
|
|
170
|
+
|
|
171
|
+
## Telemetry and diagnosis
|
|
172
|
+
|
|
173
|
+
TypeScript watch state exposes a `mailbox` snapshot under both
|
|
174
|
+
`typescriptSemantic` and `typescriptIndex`. Rust helper state exposes the same
|
|
175
|
+
snapshot. It contains:
|
|
176
|
+
|
|
177
|
+
- `pending`, `inflight`, `responses`, and `deadLetters`;
|
|
178
|
+
- `invalid`;
|
|
179
|
+
- `totalItems` and `totalBytes`; and
|
|
180
|
+
- `oldestPendingAt` when pending work exists.
|
|
181
|
+
|
|
182
|
+
This snapshot identifies current retained pressure; it is not a cumulative
|
|
183
|
+
success counter. A rising pending count with a live heartbeat indicates
|
|
184
|
+
service throughput pressure. Inflight work older than its valid lease is
|
|
185
|
+
reclaimed on the next loop only when the owner record proves the process
|
|
186
|
+
instance is gone. Responses are expected during the ten-minute idempotency
|
|
187
|
+
window. Clock-domain rules for these records are documented in
|
|
188
|
+
[Time Semantics](TIME_SEMANTICS.md).
|
|
189
|
+
|
|
190
|
+
Focused contract coverage lives in:
|
|
191
|
+
|
|
192
|
+
- `tests/storage/bounded-mailbox.test.ts`;
|
|
193
|
+
- `tests/semantic/typescript/typescript-session-mailbox.test.ts`;
|
|
194
|
+
- `tests/reindex/typescript-index-mailbox.test.ts`;
|
|
195
|
+
- `tests/semantic/rust/durable-session-protocol.test.ts`;
|
|
196
|
+
- `tests/semantic/rust/rust-durable-session.test.ts`; and
|
|
197
|
+
- `tests/platform/watch-service-state.test.ts`.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Reindex Metadata Compatibility
|
|
2
|
+
|
|
3
|
+
Reindex metadata is the persisted description in `meta.json` that identifies
|
|
4
|
+
the source-input fingerprint, indexed languages, completeness, and optional
|
|
5
|
+
reuse capabilities of one accepted index generation. It is a compatibility
|
|
6
|
+
record rather than an authority by itself: a consumer still verifies the
|
|
7
|
+
database, SCIP companion, immutable-generation state, or current source
|
|
8
|
+
fingerprint required by its operation.
|
|
9
|
+
|
|
10
|
+
`src/domain/reindex-metadata.ts` is the dependency-free decoding boundary. It
|
|
11
|
+
classifies an input as:
|
|
12
|
+
|
|
13
|
+
- `legacy`: a structurally valid version 2 record;
|
|
14
|
+
- `supported`: a structurally valid current version 3 record;
|
|
15
|
+
- `unsupported`: an integer version outside the readable range, with older or
|
|
16
|
+
future direction; or
|
|
17
|
+
- `malformed`: invalid JSON, a non-object, a missing/non-integer version, or an
|
|
18
|
+
invalid field in a recognized version.
|
|
19
|
+
|
|
20
|
+
The decoder shares only dependency-free object-record, timestamp,
|
|
21
|
+
scalar-number, and string-or-null-record predicates in
|
|
22
|
+
`src/domain/record-validation.ts`; moving those generic primitives out of
|
|
23
|
+
individual decoders does not change any version or capability decision.
|
|
24
|
+
|
|
25
|
+
No consumer may cast an unsupported or malformed record to the current model.
|
|
26
|
+
The decoder returns the original accepted v2/v3 object, so an authorized
|
|
27
|
+
best-effort update such as `lastRefresh` preserves unknown additive fields.
|
|
28
|
+
Future records are never rewritten.
|
|
29
|
+
|
|
30
|
+
## Version policy
|
|
31
|
+
|
|
32
|
+
| Wire version | Decoder result | Read policy | Write policy |
|
|
33
|
+
| ------------ | -------------- | ---------------------------------------------------------- | ------------------------------------------------------------ |
|
|
34
|
+
| 2 | `legacy` | Supported by common capabilities; no v3 shard capabilities | Read-only compatibility; a rebuilt generation writes v3 |
|
|
35
|
+
| 3 | `supported` | Current model | All newly published metadata |
|
|
36
|
+
| 4 | `unsupported` | Reserved migration boundary; reported explicitly | Never written until its migration and matrix are implemented |
|
|
37
|
+
| Other | `unsupported` | Fail closed for reuse/publication | Never rewritten |
|
|
38
|
+
|
|
39
|
+
Recognized versions validate `status`, optional timestamp,
|
|
40
|
+
requested/indexed language sets, skipped-language rows, SCIP companion state,
|
|
41
|
+
and v3 shard maps. A fingerprint is an opaque JSON identity for evidence and
|
|
42
|
+
stable-generation compatibility, preserving the pre-decoder v2/v3 contract;
|
|
43
|
+
freshness and publication additionally require it to be an object. Language
|
|
44
|
+
lists contain unique names from the same
|
|
45
|
+
`SUPPORTED_LANGUAGES` catalog used by configuration.
|
|
46
|
+
|
|
47
|
+
## Capability matrix
|
|
48
|
+
|
|
49
|
+
A capability is a named permission to interpret a decoded record for one
|
|
50
|
+
operation. It differs from version support because two consumers can accept
|
|
51
|
+
the same version while intentionally requiring different completeness.
|
|
52
|
+
|
|
53
|
+
| Capability | Required facts | Partial status | v2 | v3 |
|
|
54
|
+
| ----------------------------- | --------------------------------------------------------------------------------- | ----------------------------------------- | --- | --- |
|
|
55
|
+
| `usableForQuery` | Valid indexed-language set | Yes | Yes | Yes |
|
|
56
|
+
| `usableForEvidenceCache` | Fingerprint value | Yes; status is part of the cache key | Yes | Yes |
|
|
57
|
+
| `publishableGeneration` | Complete status, object fingerprint, indexed-language set | No | Yes | Yes |
|
|
58
|
+
| `stableGenerationIdentity` | Complete status, fingerprint, valid `updatedAt`; languages projected when present | No | Yes | Yes |
|
|
59
|
+
| `languageShardReuse` | Valid v3 `languageFingerprints` map | Yes, for individually successful shards | No | Yes |
|
|
60
|
+
| `typescriptProjectShardReuse` | Valid v3 `typescriptProjectShards` map | Yes, for individually successful projects | No | Yes |
|
|
61
|
+
|
|
62
|
+
Consumer-specific comparisons happen only after this matrix accepts the
|
|
63
|
+
record:
|
|
64
|
+
|
|
65
|
+
- freshness and unchanged-index reuse compare a publishable fingerprint and
|
|
66
|
+
sorted indexed languages with current inputs;
|
|
67
|
+
- shared-generation publication additionally verifies the immutable artifact
|
|
68
|
+
set, project root, and database integrity;
|
|
69
|
+
- evidence and TypeScript semantic cache keys accept complete or partial
|
|
70
|
+
records and include status, so partial and complete results cannot collide;
|
|
71
|
+
- SQLite and TypeScript service generation identities use the same canonical
|
|
72
|
+
projection and reject records without stable-identity capability;
|
|
73
|
+
- per-language and per-project reuse compare the decoded v3 shard
|
|
74
|
+
fingerprints with current fingerprints and require the corresponding shard
|
|
75
|
+
file to exist.
|
|
76
|
+
|
|
77
|
+
## Evolution procedure
|
|
78
|
+
|
|
79
|
+
Adding version 4 requires one reviewed change to the decoder and capability
|
|
80
|
+
matrix, explicit migration into a typed model, fixtures for every
|
|
81
|
+
version/status/capability row, and boundary tests for freshness, evidence,
|
|
82
|
+
generation identity, incremental reuse, semantic sessions, and shared
|
|
83
|
+
publication. A future version must remain visible as unsupported until those
|
|
84
|
+
conditions are met; silently treating it as v3 is a compatibility failure.
|