scip-query 0.19.5 → 0.19.8
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 +85 -1
- package/README.md +259 -53
- package/dist/augment-vue-worker.js +1 -1
- package/dist/chunk-2465DLHK.js +3 -0
- package/dist/{chunk-7GXM52MI.js → chunk-24GTWJ3N.js} +2 -2
- package/dist/{chunk-NH5ALKPW.js → chunk-2SNGN6U4.js} +2 -2
- package/dist/{chunk-3SVWW4PN.js → chunk-2U3OLUNJ.js} +2 -2
- package/dist/{chunk-XLTP42QA.js → chunk-33KUO7CG.js} +2 -2
- package/dist/{chunk-54HA4ZXH.js → chunk-33XTHFKR.js} +2 -2
- package/dist/{chunk-ZGZUZ7XE.js → chunk-3EDFLQ6A.js} +2 -2
- package/dist/chunk-3ZSJ3PWF.js +16 -0
- package/dist/{chunk-F6O7AAC3.js → chunk-43KC6EQZ.js} +2 -2
- package/dist/{chunk-I5RJM53C.js → chunk-464PLI5O.js} +2 -2
- package/dist/chunk-46XGSFNI.js +2 -0
- package/dist/{chunk-M7AIS73L.js → chunk-47BU5Z4T.js} +2 -2
- package/dist/chunk-4BV4QAZJ.js +5 -0
- package/dist/chunk-4YTUWQ6M.js +18 -0
- package/dist/{chunk-RV2FQIX3.js → chunk-5ML2BNRH.js} +2 -2
- package/dist/{chunk-6NSFJYRC.js → chunk-5YLUDDAF.js} +2 -2
- package/dist/chunk-67QRR5YC.js +6 -0
- package/dist/{chunk-GPBBJ5Y4.js → chunk-6GXYN7YA.js} +3 -3
- package/dist/{chunk-4333ETTV.js → chunk-6M7RONVB.js} +2 -2
- package/dist/chunk-6YTSKJJ3.js +2 -0
- package/dist/{chunk-QDV6RDCP.js → chunk-7FT5Y65S.js} +2 -2
- package/dist/{chunk-XTX6QHOF.js → chunk-7KYNAMMH.js} +2 -2
- package/dist/{chunk-DZ74OMG6.js → chunk-7LSVMFX7.js} +2 -2
- package/dist/{chunk-VTKGCT3V.js → chunk-7QHY3H7P.js} +2 -2
- package/dist/{chunk-MITTUCEH.js → chunk-7RAG65VK.js} +2 -2
- package/dist/{chunk-25LPM4DG.js → chunk-7SWJEWJF.js} +2 -2
- package/dist/{chunk-52ZYCAEO.js → chunk-7VCOXZH3.js} +2 -2
- package/dist/chunk-A2TNXAXO.js +8 -0
- package/dist/{chunk-IUFDSKGG.js → chunk-A3QXWFBK.js} +2 -2
- package/dist/{chunk-4T3LTWUS.js → chunk-AA4UWRNL.js} +2 -2
- package/dist/{chunk-4SALD7RU.js → chunk-ACAM6O5R.js} +2 -2
- package/dist/chunk-APMMR5Y2.js +2 -0
- package/dist/chunk-AQOFWNQJ.js +1 -0
- package/dist/chunk-AZFUMCQB.js +2 -0
- package/dist/{chunk-M7MTH5NR.js → chunk-BDOIKGDI.js} +2 -2
- package/dist/{chunk-BTEE5NZQ.js → chunk-BNXICU42.js} +2 -2
- package/dist/chunk-C5Q44Q5D.js +3 -0
- package/dist/{chunk-EOOJGLDU.js → chunk-CTF2GDEX.js} +2 -2
- package/dist/chunk-DHEQMPLW.js +2 -0
- package/dist/{chunk-IZKFSVBV.js → chunk-DQBCO2UY.js} +2 -2
- package/dist/{chunk-7B3UPBVA.js → chunk-DQGSM7RZ.js} +2 -2
- package/dist/chunk-E2LAW7SL.js +30 -0
- package/dist/chunk-E3HYEQO7.js +2 -0
- package/dist/chunk-E4NFOAD4.js +6 -0
- package/dist/chunk-E5HNT4X2.js +3 -0
- package/dist/{chunk-J77UIT3I.js → chunk-ELLMY7XJ.js} +2 -2
- package/dist/chunk-FD3HFKXR.js +5 -0
- package/dist/{chunk-SOAT6NLA.js → chunk-FIJCV235.js} +2 -2
- package/dist/{chunk-H7UKLTWJ.js → chunk-FJ5UDTQF.js} +2 -2
- package/dist/{chunk-HEXVUYFQ.js → chunk-GHKEJTCE.js} +2 -2
- package/dist/{chunk-LBMJEAEW.js → chunk-GLZTVKAB.js} +3 -3
- package/dist/{chunk-FWUUZTIO.js → chunk-GNC4JVAN.js} +2 -2
- package/dist/chunk-HIB452NU.js +949 -0
- package/dist/{chunk-NRCXJDHL.js → chunk-HZYDQPNY.js} +2 -2
- package/dist/chunk-IF6FP6B2.js +66 -0
- package/dist/{chunk-4RSI5EMG.js → chunk-JAY7YWS3.js} +2 -2
- package/dist/{chunk-STOL2BTL.js → chunk-JHF3E4YM.js} +2 -2
- package/dist/chunk-JORHF5AL.js +108 -0
- package/dist/{chunk-A2EZV2UM.js → chunk-K2WO7XY7.js} +2 -2
- package/dist/chunk-KFZNKUNT.js +2 -0
- package/dist/{chunk-YVVCVR2L.js → chunk-KJ2IIBZN.js} +2 -2
- package/dist/{chunk-QGXBRIM5.js → chunk-KKME5ZAI.js} +2 -2
- package/dist/chunk-KSGTULOS.js +9 -0
- package/dist/{chunk-UOAV44HR.js → chunk-KXDJAG4N.js} +3 -3
- package/dist/{chunk-UKZBVX4U.js → chunk-L4S2A7BV.js} +2 -2
- package/dist/chunk-LP3ARJKF.js +8 -0
- package/dist/chunk-LSOR3LQG.js +3 -0
- package/dist/{chunk-Q4IIEGXJ.js → chunk-MLFZP76A.js} +2 -2
- package/dist/{chunk-WQTAC523.js → chunk-MNSTUIDD.js} +2 -2
- package/dist/{chunk-VXQNNXJE.js → chunk-MSBDMFER.js} +2 -2
- package/dist/{chunk-X6D5IC6I.js → chunk-MZZBAITE.js} +5 -5
- package/dist/{chunk-I5AWSI2G.js → chunk-NE3TZUCI.js} +2 -2
- package/dist/{chunk-6E7UTQY7.js → chunk-NTUMF2X3.js} +2 -2
- package/dist/{chunk-S44IULR6.js → chunk-O23I56NA.js} +2 -2
- package/dist/{chunk-CFMXJPHH.js → chunk-O3O4XXO6.js} +2 -2
- package/dist/{chunk-IG7N5ZIK.js → chunk-OUBAF226.js} +2 -2
- package/dist/chunk-P3UO3EH3.js +2 -0
- package/dist/{chunk-YNRNA5LK.js → chunk-QGGLL3UH.js} +2 -2
- package/dist/chunk-QIQ63BHW.js +16 -0
- package/dist/{chunk-VGRICIQI.js → chunk-QJIVBYEK.js} +2 -2
- package/dist/chunk-QOXBSI6G.js +20 -0
- package/dist/chunk-QXK6UUSM.js +2 -0
- package/dist/{chunk-XYADIZHU.js → chunk-RA3AYNWP.js} +2 -2
- package/dist/chunk-RJMDJR3A.js +2 -0
- package/dist/{chunk-NSS46APD.js → chunk-RLH5VUMG.js} +2 -2
- package/dist/{chunk-GBQ5NYPR.js → chunk-S4S2WOIX.js} +6 -6
- package/dist/{chunk-YIJ7ZAA4.js → chunk-SERUIGV5.js} +2 -2
- package/dist/{chunk-FECYOO5O.js → chunk-SMQWE25B.js} +2 -2
- package/dist/{chunk-R4FQGQ4X.js → chunk-TAVELHYR.js} +2 -2
- package/dist/{chunk-U6WNH5GC.js → chunk-TWMJ3Y3G.js} +2 -2
- package/dist/chunk-VAXNI5NE.js +146 -0
- package/dist/chunk-VVY2G5ET.js +2 -0
- package/dist/{chunk-WER3B7MI.js → chunk-W3DBTGL4.js} +2 -2
- package/dist/{chunk-CNKAGUPL.js → chunk-WANA4KAQ.js} +2 -2
- package/dist/chunk-WJL2L6MV.js +60 -0
- package/dist/chunk-WUW7YUAH.js +11 -0
- package/dist/{chunk-QVWS2VWZ.js → chunk-WWKWUPSU.js} +2 -2
- package/dist/{chunk-ABMYA4TN.js → chunk-WY45BHKQ.js} +2 -2
- package/dist/chunk-X4FR5BZF.js +9 -0
- package/dist/chunk-X6RKPDY7.js +2 -0
- package/dist/{chunk-ZXJYMGD3.js → chunk-YLFORA5G.js} +2 -2
- package/dist/{chunk-KP6XRY5Z.js → chunk-YTVWB7YJ.js} +2 -2
- package/dist/{chunk-4XTA5OMB.js → chunk-ZCEJ63SP.js} +2 -2
- package/dist/{chunk-HKEHS2AS.js → chunk-ZJ5CBXK3.js} +2 -2
- package/dist/chunk-ZL2OGDCD.js +2 -0
- package/dist/cli.js +8 -3
- package/dist/command-descriptors-ZW5J4ZEM.js +631 -0
- package/dist/{config-types-D20KuvvZ.d.ts → config-types-B6MEoRNy.d.ts} +8 -0
- package/dist/{db-G_II8yXU.d.ts → db-DYLKr9Wn.d.ts} +18 -1
- package/dist/direct-navigation-42YHQPOI.js +3 -0
- package/dist/{health-oblXYgkF.d.ts → health-DgxIDXJC.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 +26 -26
- package/dist/reindex.d.ts +14 -4
- package/dist/reindex.js +34 -38
- package/dist/runtime.d.ts +167 -18
- 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-Cc6c00-a.d.ts} +6 -2
- package/dist/watch-server.js +5 -5
- package/docs/AGENT_GUIDE.md +20 -4
- package/docs/AI_FAILURE_MODES.md +17 -17
- package/docs/API_EVOLUTION.md +71 -0
- package/docs/CLI_JSON_OUTPUT.md +168 -0
- package/docs/COMMAND_REFERENCE.md +10 -6
- package/docs/COMMITTED_RECORD_COMPATIBILITY.md +117 -0
- package/docs/CONFIGURATION_WRITE_SAFETY.md +130 -0
- package/docs/DETECTOR_GUIDE.md +46 -46
- 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/SECURITY_MODEL.md +129 -0
- package/docs/TELEMETRY_RETENTION.md +77 -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/cli-output-page.schema.json +104 -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 +21 -10
- 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 +90 -229
- 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 +77 -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} +11 -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 +54 -85
- 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 +53 -98
- package/skills/scip-query/agents/openai.yaml +2 -2
- package/skills/scip-setup/SKILL.md +69 -181
- 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 +126 -84
- 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-2YU7I3QO.js +0 -2
- package/dist/chunk-3MJ5YA4Y.js +0 -16
- package/dist/chunk-64RFXJT5.js +0 -16
- package/dist/chunk-7UY7SD7D.js +0 -927
- package/dist/chunk-B5NLK2B3.js +0 -6
- package/dist/chunk-C2QSK7E7.js +0 -2
- package/dist/chunk-C7NIYIQ4.js +0 -67
- package/dist/chunk-D4U5Q3FT.js +0 -7
- package/dist/chunk-DGAGY7RJ.js +0 -60
- package/dist/chunk-DLWR3NUU.js +0 -5
- 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-NPKYOIFM.js +0 -18
- package/dist/chunk-NZL2DBT7.js +0 -2
- package/dist/chunk-OMPZHGHO.js +0 -2
- package/dist/chunk-P2PC2WGR.js +0 -2
- package/dist/chunk-Q3AFUTGB.js +0 -8
- package/dist/chunk-QRGV2F7L.js +0 -2
- package/dist/chunk-TW4OG5FC.js +0 -4
- package/dist/chunk-U7DSEKOM.js +0 -30
- package/dist/chunk-V27BEQJN.js +0 -7
- package/dist/chunk-XAGAZSFE.js +0 -6
- package/dist/chunk-XBN5VO53.js +0 -2
- package/dist/chunk-YGAGTIDK.js +0 -11
- package/dist/command-descriptors-N2TL4XM2.js +0 -613
- package/dist/direct-navigation-DUCZCTOE.js +0 -3
- package/skills/scip-api-impact/SKILL.md +0 -140
- 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 -107
- package/skills/scip-claim-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-audit/SKILL.md +0 -130
- package/skills/scip-cleanup-audit/agents/openai.yaml +0 -4
- package/skills/scip-cleanup-improve/SKILL.md +0 -85
- package/skills/scip-cleanup-improve/agents/openai.yaml +0 -4
- package/skills/scip-concrete-plan/HIGH_ASSURANCE.md +0 -317
- package/skills/scip-concrete-plan/SKILL.md +0 -105
- 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 -266
- 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 -151
- 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 -133
- package/skills/scip-triage-issue/agents/openai.yaml +0 -4
- package/skills/scip-twin-drift/SKILL.md +0 -109
- 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,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.
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Durable Rust session protocol
|
|
2
|
+
|
|
3
|
+
The durable Rust session protocol is the versioned filesystem-message contract
|
|
4
|
+
between a synchronous scip-query process and the reusable process that owns
|
|
5
|
+
rust-analyzer. Its essential safety property is correlation: a result becomes
|
|
6
|
+
usable only after it proves that it belongs to the same logical operation,
|
|
7
|
+
mailbox namespace, and absolute processing interval that the caller admitted.
|
|
8
|
+
|
|
9
|
+
A mailbox-session identity is a SHA-256 value derived from the absolute
|
|
10
|
+
durable-session directory and protocol version. The directory is already
|
|
11
|
+
separated by canonical project root and helper-binary fingerprint; the
|
|
12
|
+
explicit identity makes that separation part of every message rather than an
|
|
13
|
+
assumption inherited from its pathname. A response copied from another
|
|
14
|
+
project or helper directory therefore cannot satisfy the reader.
|
|
15
|
+
|
|
16
|
+
An operation identity is the SHA-256 of the answer-affecting Rust request. It
|
|
17
|
+
is wider than one client attempt: an exact retry joins the same pending,
|
|
18
|
+
inflight, or retained completion. The authoritative deadline is the absolute
|
|
19
|
+
deadline on the first admitted copy of that operation. Later duplicate
|
|
20
|
+
attempts read that retained deadline instead of substituting a new one, which
|
|
21
|
+
keeps the response's time identity stable.
|
|
22
|
+
|
|
23
|
+
## Current v3 request
|
|
24
|
+
|
|
25
|
+
Every newly written request contains:
|
|
26
|
+
|
|
27
|
+
- `mailboxVersion: 1`;
|
|
28
|
+
- `protocolVersion: 3`;
|
|
29
|
+
- `operationKey` and the derived `id: op-<operationKey>`;
|
|
30
|
+
- a non-empty `clientId`;
|
|
31
|
+
- finite `enqueuedAtMs` and `deadlineAtMs`, where their difference equals the
|
|
32
|
+
domain request's positive `timeoutMs`;
|
|
33
|
+
- `sessionIdentity`; and
|
|
34
|
+
- one strictly decoded `semantic` or `import-definitions` request.
|
|
35
|
+
|
|
36
|
+
The server recomputes the operation key after validating the domain request.
|
|
37
|
+
It validates all required definition or import-position fields and every
|
|
38
|
+
optional timeout, concurrency, boolean, and worker-environment field before
|
|
39
|
+
calling rust-analyzer. Unknown additive object members remain allowed; a
|
|
40
|
+
wrong discriminant or wrong field type does not.
|
|
41
|
+
|
|
42
|
+
The civil timestamps are shared-record facts, not wait-loop clocks. Before
|
|
43
|
+
work, the server requires `now <= deadlineAtMs`. After rust-analyzer returns,
|
|
44
|
+
it checks the absolute deadline again and publishes an `expired-request`
|
|
45
|
+
rejection instead of a success if work crossed it. Process-local waits and
|
|
46
|
+
readiness bounds continue to use monotonic time as documented in
|
|
47
|
+
[Time Semantics](TIME_SEMANTICS.md).
|
|
48
|
+
|
|
49
|
+
## Current v3 response
|
|
50
|
+
|
|
51
|
+
The bounded mailbox supplies `mailboxVersion`, `operationKey`, `clientId`,
|
|
52
|
+
`completedAtMs`, `expiresAtMs`, and the authoritative `deadlineAtMs`. The Rust
|
|
53
|
+
server adds:
|
|
54
|
+
|
|
55
|
+
- `protocolVersion: 3`;
|
|
56
|
+
- the request `id`;
|
|
57
|
+
- the request's `sessionIdentity`;
|
|
58
|
+
- either `ok: true`, the session disposition, and the kind-specific response;
|
|
59
|
+
or
|
|
60
|
+
- `ok: false`, a typed `errorCode`, and a diagnostic message.
|
|
61
|
+
|
|
62
|
+
The client accepts a success or rejection only when protocol version, mailbox
|
|
63
|
+
version, request ID, operation key, session identity, and authoritative
|
|
64
|
+
deadline exactly match its admitted operation. It also requires both the
|
|
65
|
+
helper's completion time and the observation time to be no later than that
|
|
66
|
+
deadline. A semantic request cannot consume an import-definition response,
|
|
67
|
+
and the reverse is also rejected.
|
|
68
|
+
|
|
69
|
+
Typed rejection codes are:
|
|
70
|
+
|
|
71
|
+
| Code | Meaning |
|
|
72
|
+
| ---------------------- | ----------------------------------------------------------------------- |
|
|
73
|
+
| `unsupported-protocol` | The outer lifecycle was correlatable, but its domain protocol is newer. |
|
|
74
|
+
| `malformed-request` | Identity, lifecycle, kind, or domain payload validation failed. |
|
|
75
|
+
| `expired-request` | Work was already expired or crossed its deadline. |
|
|
76
|
+
| `handler-error` | A validated request reached the Rust host and the host failed. |
|
|
77
|
+
|
|
78
|
+
When malformed bytes do not contain enough trustworthy identity to correlate
|
|
79
|
+
a response, the server still retains the rejection and dead-letter evidence,
|
|
80
|
+
but a current client will not accept that uncorrelated file as the answer to a
|
|
81
|
+
request.
|
|
82
|
+
|
|
83
|
+
## Compatibility matrix
|
|
84
|
+
|
|
85
|
+
| Writer or peer | Current reader/server behavior |
|
|
86
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
87
|
+
| Unversioned v2 `{id, request}` client | Accepted during the bounded overlap window after strict request-kind validation. The server synthesizes lifecycle/session fields and writes an additive response. |
|
|
88
|
+
| Prior v3 client without session field | Accepted as `prior-v3` when every other v3 lifecycle field and the recomputed operation identity are valid. The server supplies and echoes the namespace identity. |
|
|
89
|
+
| Current v3 client | Fully correlated current path. |
|
|
90
|
+
| Future explicitly versioned client | Never treated as legacy. A safely correlated envelope receives `unsupported-protocol`; an uncorrelatable envelope receives a generic malformed rejection. |
|
|
91
|
+
| Prior v3 server response | Rejected by the current client as an incompatible uncorrelated response because it lacks session/deadline proof. |
|
|
92
|
+
| Current v3 server to prior v3 client | Additive: the prior reader's established root fields remain in place, and it ignores the new correlation/error metadata. |
|
|
93
|
+
| Future server response | Rejected before response data is exposed. |
|
|
94
|
+
|
|
95
|
+
The server executable's content fingerprint is part of the mailbox directory,
|
|
96
|
+
so normal upgrades select a new namespace rather than pairing a current client
|
|
97
|
+
with a prior helper. The explicit compatibility behavior still matters for
|
|
98
|
+
retained files, rollback, test fixtures, and manual recovery.
|
|
99
|
+
|
|
100
|
+
## Replay, retry, and recovery
|
|
101
|
+
|
|
102
|
+
An exact retry keeps its operation key and request ID. The mailbox returns the
|
|
103
|
+
deadline of the authoritative pending, inflight, or completed record, so the
|
|
104
|
+
retry validates the original response rather than relabeling it with the new
|
|
105
|
+
attempt's deadline. A retained completion observed after that deadline is
|
|
106
|
+
rejected even if the retention window has not yet collected its bytes.
|
|
107
|
+
|
|
108
|
+
A response with the right request ID but a different operation key is a
|
|
109
|
+
different operation. A response with both identities but a different
|
|
110
|
+
mailbox-session identity is a cross-session replay. A response whose echoed
|
|
111
|
+
deadline differs is a different lifecycle. All three fail before payload
|
|
112
|
+
decoding.
|
|
113
|
+
|
|
114
|
+
If the current client reports an incompatible prior-server response, remove
|
|
115
|
+
only the specific durable session directory after confirming no current
|
|
116
|
+
scip-query process owns it, then retry so the content-addressed current helper
|
|
117
|
+
creates a fresh namespace. Do not delete a broad cache root.
|
|
118
|
+
|
|
119
|
+
Executable coverage lives in:
|
|
120
|
+
|
|
121
|
+
- `tests/semantic/rust/durable-session-protocol.test.ts`;
|
|
122
|
+
- `tests/semantic/rust/rust-durable-session.test.ts`; and
|
|
123
|
+
- `tests/storage/bounded-mailbox.test.ts`.
|
|
124
|
+
|
|
125
|
+
The shared pending/inflight/completion state machine remains documented in
|
|
126
|
+
[Filesystem mailbox lifecycle](MAILBOX_LIFECYCLE.md).
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Security model
|
|
2
|
+
|
|
3
|
+
`scip-query` treats a checked-out repository and every index or cache artifact
|
|
4
|
+
derived from it as untrusted input. An untrusted checkout is a directory of
|
|
5
|
+
files supplied by a project rather than by the operator, distinguished from
|
|
6
|
+
ordinary input by being able to name source paths, tools, configuration, and
|
|
7
|
+
persisted records that the CLI may otherwise be tempted to trust.
|
|
8
|
+
|
|
9
|
+
The default analysis boundary may read repository files and managed,
|
|
10
|
+
rebuildable cache artifacts. It may not execute a repository-selected program,
|
|
11
|
+
adopt an arbitrary cache directory, escape the canonical project root through
|
|
12
|
+
an indexed path, or install a mutable tool identity merely because the
|
|
13
|
+
checkout requests it.
|
|
14
|
+
|
|
15
|
+
## Explicit authority
|
|
16
|
+
|
|
17
|
+
An authority grant is an operator action that permits one otherwise-forbidden
|
|
18
|
+
effect, distinguished from project configuration by coming from the current
|
|
19
|
+
CLI invocation:
|
|
20
|
+
|
|
21
|
+
- `--trust-project-tools` permits reviewed repository-local indexer
|
|
22
|
+
executables for that invocation.
|
|
23
|
+
- `--tla-tools <jar>` selects a reviewed TLA jar explicitly. The default
|
|
24
|
+
downloaded TLA artifact remains version- and SHA-256-pinned.
|
|
25
|
+
- `--install-missing` permits installation of the exact immutable tool
|
|
26
|
+
identities listed by the command. Without it, missing tools produce setup
|
|
27
|
+
instructions instead of a mutation.
|
|
28
|
+
- environment overrides such as `SCIP_QUERY_CACHE_DIR` are operator-owned
|
|
29
|
+
storage choices. Tracked `.scipquery.json` cannot grant destructive authority
|
|
30
|
+
over an arbitrary external cache.
|
|
31
|
+
|
|
32
|
+
A managed cache is rebuildable local state rooted under a scip-query-owned
|
|
33
|
+
directory, distinguished from a caller-selected directory by an ownership
|
|
34
|
+
record and canonical containment checks. Destructive cache operations require
|
|
35
|
+
both properties.
|
|
36
|
+
|
|
37
|
+
## Input budgets
|
|
38
|
+
|
|
39
|
+
An input budget is a maximum amount of untrusted data one operation will
|
|
40
|
+
materialize or ask a parser to compile, distinguished from silent truncation by
|
|
41
|
+
failing explicitly with the input kind, observed amount, and accepted limit.
|
|
42
|
+
|
|
43
|
+
| Input class | Limit | Representative users |
|
|
44
|
+
| ------------------------------------------------------ | -----------------------: | ------------------------------------------------------------------------ |
|
|
45
|
+
| Config, manifest, lock, lease, and other small records | 8 MiB | `.scipquery.json`, package manifests, generation metadata, hook settings |
|
|
46
|
+
| One source or per-document fragment | 64 MiB | indexed source reads, TypeScript/Vue snapshots, mailbox result payloads |
|
|
47
|
+
| One SCIP index artifact | 512 MiB | merge, sanitize, Rust occurrence fallback, shared-generation hydration |
|
|
48
|
+
| Profile or retained JSONL artifact | 256 MiB | profiling audits, legacy event ledgers, rotating diagnostic segments |
|
|
49
|
+
| Generated TLA trace | 16 MiB and 100,000 steps | `tla instrument` recorder |
|
|
50
|
+
| Repository-supplied regular-expression pattern | 4,096 characters | entry-root patterns and TLA statement bindings |
|
|
51
|
+
| Agent hook standard input | 8 MiB | stop-hook request payload |
|
|
52
|
+
|
|
53
|
+
Regular files are opened first, checked through that descriptor, read, and
|
|
54
|
+
checked again so replacement or growth cannot bypass the pre-read limit.
|
|
55
|
+
Streams and pseudo-files are counted while reading. Large file fingerprints
|
|
56
|
+
are computed in fixed-size chunks rather than by retaining the complete file.
|
|
57
|
+
|
|
58
|
+
An oversized artifact is not partially interpreted. Operations that require
|
|
59
|
+
the complete artifact fail and name the limit; query-level detectors that
|
|
60
|
+
intentionally sample or cap logical rows retain their existing machine-readable
|
|
61
|
+
coverage metadata and `--full` remediation.
|
|
62
|
+
|
|
63
|
+
## Complete command output
|
|
64
|
+
|
|
65
|
+
Output pagination is a resumable transport for one rendered command result,
|
|
66
|
+
distinguished from a result limit by preserving every rendered character.
|
|
67
|
+
Human output above 12,000 characters automatically includes the exact command
|
|
68
|
+
for the next page. Large default JSON remains byte-compatible and writes the
|
|
69
|
+
exact opt-in paging command to stderr before and after the JSON stream.
|
|
70
|
+
|
|
71
|
+
Every command accepts:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
--output-page-size <characters>
|
|
75
|
+
--output-cursor <cursor>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The opaque cursor binds the command, working directory, non-pagination
|
|
79
|
+
arguments, next character offset, private output snapshot, and complete output
|
|
80
|
+
hash. The first invocation streams the output to current-user temporary
|
|
81
|
+
storage with private permissions while retaining only one page in memory.
|
|
82
|
+
Continuations read that immutable snapshot instead of re-running a command
|
|
83
|
+
whose timestamps or durations may change. Snapshots expire after one hour and
|
|
84
|
+
are removed after the final page; an unavailable snapshot produces the exact
|
|
85
|
+
page-one restart command.
|
|
86
|
+
|
|
87
|
+
Continue until `page.complete` is `true`. Do not pipe output through `head`,
|
|
88
|
+
`tail`, or a line-range `sed`; those programs discard data without creating a
|
|
89
|
+
resumable position. Every incomplete JSON page repeats this obligation in
|
|
90
|
+
`agentInstruction`; an incomplete page must not support a conclusion or
|
|
91
|
+
completion claim. See [CLI JSON output](CLI_JSON_OUTPUT.md) and the
|
|
92
|
+
[output-page schema](schemas/cli-output-page.schema.json).
|
|
93
|
+
|
|
94
|
+
## Diff-gate process containment
|
|
95
|
+
|
|
96
|
+
A diff-gate lease is one live process identity permitted to evaluate a
|
|
97
|
+
project's current diff, distinguished from an ordinary lock file by recording
|
|
98
|
+
and validating the owner's PID, process start, and project identity. CLI and
|
|
99
|
+
Stop-hook gates share this lease, so an overlapping request reports the live
|
|
100
|
+
owner instead of multiplying detector work.
|
|
101
|
+
|
|
102
|
+
The public gate owns an isolated child process. Its default deadline is 60
|
|
103
|
+
seconds, or 180 seconds with `--full`. On timeout, failure, or interruption the
|
|
104
|
+
parent terminates and reaps that child before releasing the lease. An operator
|
|
105
|
+
may set `SCIP_QUERY_DIFF_GATE_TIMEOUT_MS` to a positive millisecond value; the
|
|
106
|
+
runtime caps it at 10 minutes.
|
|
107
|
+
|
|
108
|
+
Outcome reconciliation rechecks at most one historical comparison base per
|
|
109
|
+
gate. Deferred bases remain open and the result reports their exact base and
|
|
110
|
+
finding counts, so accumulated event history cannot silently multiply one
|
|
111
|
+
foreground gate into an unbounded replay batch.
|
|
112
|
+
|
|
113
|
+
## Terminal and JSON output
|
|
114
|
+
|
|
115
|
+
Human terminal output is presentation text written to an interactive terminal,
|
|
116
|
+
distinguished from JSON by being able to activate terminal control sequences.
|
|
117
|
+
Repository-controlled human fields therefore have control bytes rendered
|
|
118
|
+
inert. JSON values retain their printable data and are protected by JSON
|
|
119
|
+
encoding rather than human-output rewriting.
|
|
120
|
+
|
|
121
|
+
Registry and release diagnostics redact URL user information and
|
|
122
|
+
credential-bearing query fields before rendering nested errors.
|
|
123
|
+
|
|
124
|
+
## Reporting a security issue
|
|
125
|
+
|
|
126
|
+
Do not include a live credential, private repository, or destructive
|
|
127
|
+
proof-of-concept target in a public report. Describe the affected command,
|
|
128
|
+
platform, trust flags, and smallest disposable reproduction needed to
|
|
129
|
+
distinguish the boundary failure.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Operational Telemetry Retention
|
|
2
|
+
|
|
3
|
+
Operational telemetry is observational history produced while scip-query
|
|
4
|
+
works. Its concrete referents here are `reindex-activity.jsonl`, which records
|
|
5
|
+
refresh frequency and estimated logical output, and `affected-shadow.jsonl`,
|
|
6
|
+
which records compact affected-set calibration outcomes. It differs from an
|
|
7
|
+
authoritative record because no index generation, policy decision, ownership
|
|
8
|
+
claim, or completed user operation is reconstructed from it.
|
|
9
|
+
|
|
10
|
+
## Retained segment set
|
|
11
|
+
|
|
12
|
+
Each history has two ordered segments:
|
|
13
|
+
|
|
14
|
+
1. `<history>.previous` is the older retained segment.
|
|
15
|
+
2. `<history>` is the current append segment.
|
|
16
|
+
|
|
17
|
+
The reindex-activity limit is 1 MiB per segment. The affected-shadow limit is
|
|
18
|
+
8 MiB per segment. A single JSON record larger than its configured limit
|
|
19
|
+
expands that segment's effective limit to the complete record size; a
|
|
20
|
+
successful append is never made immediately ineligible by its own size.
|
|
21
|
+
Rotation removes the former previous segment, renames the complete current
|
|
22
|
+
segment to previous, and then creates the new current segment. Readers scan
|
|
23
|
+
previous before current.
|
|
24
|
+
|
|
25
|
+
Retention deliberately permits deletion of records older than those two
|
|
26
|
+
segments. That bounded-history deletion is different from concurrency loss:
|
|
27
|
+
which segment is pruned is decided while the append/rotation lock excludes
|
|
28
|
+
other writers.
|
|
29
|
+
|
|
30
|
+
The retained-set reader also has a 256 MiB byte budget across the files it
|
|
31
|
+
opens. It validates each segment as the same regular file before and after the
|
|
32
|
+
read. Exceeding that operational budget is an explicit read failure; it does
|
|
33
|
+
not silently return a prefix and present it as complete telemetry.
|
|
34
|
+
|
|
35
|
+
## Serialization and crash recovery
|
|
36
|
+
|
|
37
|
+
The rotation lock is `<history>.rotation.lock`. It is a process-instance lock:
|
|
38
|
+
its record contains a PID, an operating-system process-start identity when
|
|
39
|
+
available, and a random token, and only that owner can release it. Lock
|
|
40
|
+
acquisition, incomplete-tail repair, retention pruning, rename, append, and
|
|
41
|
+
the default retained-set read all occur beneath that lock. Waits use a
|
|
42
|
+
process-local monotonic two-second budget.
|
|
43
|
+
|
|
44
|
+
Every append is one newline-terminated JSON value. If a process stops during
|
|
45
|
+
the append, the current segment can end in one incomplete tail. The next
|
|
46
|
+
writer truncates only the bytes after the last newline before it rotates or
|
|
47
|
+
appends. Readers ignore and count incomplete tail bytes. A stop after current
|
|
48
|
+
is renamed but before the new append leaves the old complete segment at
|
|
49
|
+
`.previous`; a later writer creates a new current segment.
|
|
50
|
+
|
|
51
|
+
These files are process-visible but not crash-durable. They are not fsynced,
|
|
52
|
+
so a kernel or power failure may lose the newest observation even after the
|
|
53
|
+
write call returned. That is acceptable only because the histories are
|
|
54
|
+
operational evidence. Authoritative index, lock, suppression, configuration,
|
|
55
|
+
mailbox-response, and release records use their own durable protocols.
|
|
56
|
+
|
|
57
|
+
## Failure contract
|
|
58
|
+
|
|
59
|
+
Lock timeout and ownership-changed release are typed failures at the shared
|
|
60
|
+
helper boundary. The reindex-activity and affected-shadow production writers
|
|
61
|
+
remain best effort: they catch telemetry failure so an observation cannot
|
|
62
|
+
change the authoritative reindex result. Callers that invoke the shared helper
|
|
63
|
+
directly can distinguish lock timeout, count repaired tail bytes, and count
|
|
64
|
+
partial bytes ignored during reads.
|
|
65
|
+
|
|
66
|
+
The regression suite forces:
|
|
67
|
+
|
|
68
|
+
- a competing writer at tail repair, prior-segment pruning, current rotation,
|
|
69
|
+
and append;
|
|
70
|
+
- a stop after rotation and a partial append tail;
|
|
71
|
+
- bounded retention across three rotations;
|
|
72
|
+
- deterministic previous-then-current reads;
|
|
73
|
+
- partial legacy tails; and
|
|
74
|
+
- bounded live-owner contention.
|
|
75
|
+
|
|
76
|
+
The implementation is `src/reindex/rotating-jsonl.ts`; its direct contract
|
|
77
|
+
tests are `tests/reindex/rotating-jsonl.test.ts`.
|