flightopsDocumentation
Reference: history

Local cases and strategy knowledge

4 min readdocs/reference/knowledge.md (source repository)

flightops knowledge stores selected investigation cases and immutable human-guidance revisions beside the existing local history catalog. It keeps the exact configuration snapshot, attempt-assessment IDs, evidence-receipt IDs, reproduction notes, contradictions, and explicit unknowns. A case may describe an unsuccessful, interrupted, inconclusive, or unrun investigation; none of those states is promoted to a successful result by being stored here.

Cases use flightops.knowledge-case/1. Strategy revisions use flightops.knowledge-strategy/1; each revision binds to a separate bounded JSON procedure payload by digest. Procedure steps are descriptive guidance with prerequisites, exceptions, and an expected observation. No strategy command is run. The immutable record and the append-only review/retraction/ invalidation event log are separate from the mutable current status projection.

Local CLI

The CLI uses the shared database at state_home()/history/catalog.sqlite3 unless --database is supplied. Case creation reads one selected JSON record and leaves snapshot/assessment/receipt references exactly as given:

sh
flightops knowledge case create ./case.json
flightops knowledge case show 0123456789abcdef0123456789abcdef
flightops knowledge case search "silent camera"

Replace REVISION_DIGEST and CURRENT_SNAPSHOT_ID below with the selected revision digest and current snapshot ID. Strategy metadata and its procedure are selected separately. A new revision with no revision uses the next revision number for its strategy ID. Imported and model-origin procedures remain quarantined; showing one requires the explicit --include-quarantined inspection flag. --origin imported and --origin model preserve those origins as quarantined records.

sh
flightops knowledge strategy create ./strategy.json --procedure ./steps.json
flightops knowledge strategy list
flightops knowledge strategy show REVISION_DIGEST
flightops knowledge strategy applicability REVISION_DIGEST CURRENT_SNAPSHOT_ID

Review records the caller-declared identity, requested state, and reason. That identity is not authenticated by this local adapter. A second distinct declared identity is displayed as reviewed_declared; a self-review is self_review_not_independent. Neither state is an independently verified review credential. Imported/model procedures stay quarantined after review. Retraction and dependency invalidation append events and leave prior case and strategy bytes intact. Reopening a retracted record returns its tombstone and withholds the procedure body.

Eligibility and evidence boundaries

List, search, and exact-read operations default to use=retain. An explicit --use inference requests the additional source-use decision for inference. The Python API also accepts share and train; those uses have separate source-use decisions. Every read and create operation requires a current metadata authorization callback. Creation also needs a source authorization callback when it cites history evidence. The local CLI treats invoking the selected command as the current local metadata selection; it does not bypass source-use policy. When a record cites evidence receipts, the catalog checks the latest source-use decision for each source and all declared upstream derivations, then asks the caller to authorize each consulted source for retention and the requested use. Unknown or denied policy, missing metadata authority, or a revoked parent withholds the case/strategy content. To bound policy checks, one knowledge item may resolve at most 32 distinct source artifacts and 1,000 consulted policy records; larger lineages fail closed. A receipt may still be surfaced with its historical state (for example missing or changed) when current retention policy permits the surrounding metadata.

The Python API also provides KnowledgeCatalog.get_configuration_snapshot(snapshot_id, authorize_metadata=..., authorize_source=...) for retain-only snapshot reads. It checks the snapshot's field-level receipt references, assessment configuration snapshots, evaluator boundary receipts, and receipt derivations, then rechecks those rights before returning the exact native snapshot. Applicability comparisons use the same gates for both the saved basis and selected current snapshot. They never request inference use. Withheld reads redact free-text status reasons; a retracted strategy returns only a minimal tombstone.

strategy applicability compares the saved basis snapshot with a selected current snapshot. It reports match, difference, or unknown for project, robot, asset, physical unit, installation, and every configuration field, including firmware, driver, mounting, calibration, and clock relationships. Differences, unknowns, and the strategy's explicit required rechecks are returned as required_rechecks. Matching recorded facts do not validate a strategy today: prior results remain historical, current validation is still required, and execution_authorized is always false.

Legacy AI lesson files are exposed through a read-only adapter as quarantined_legacy notes. Their old review state is not inherited and they are never copied into the knowledge catalog automatically.

Storage and backup

Knowledge metadata is additive in the shared SQLite database. Strategy procedure bytes live under the private sibling directory <catalog.sqlite3>.knowledge/; the catalog records their digest, size, and availability. A missing, changed, excluded, or unsafe payload is never returned. The HistoryCatalog portable backup currently excludes this entire extension, inventories only bounded row counts/digests, strips its rows from the copied database, and restores an empty safe knowledge schema. These local cases, review events, and private procedure bytes are therefore not portable through that backup path. No original machine path is resolved after restore.