Skip to content

I1987 — A knowledge record's file provenance survives the file's deletion

Let derived_from name a file at a commit (`file:<path>@<commit>`), or resolve `file:` at the record's own commit, so that deleting a cited file does not break knowledge check.

DONE wave 0 · p2 · implementation profile · parallel safe

Part of adopter-upgrades — An adopting repository survives a Majordomus upgrade, and what the tool vendors into it is adopter-neutral.

Objective

Let derived_from name a file at a commit (`file:<path>@<commit>`), or resolve `file:` at the record's own commit, so that deleting a cited file does not break knowledge check.

Why

OSCILLA 5467193: derived_from file:tests/engine.cjs and file:tests/smoke.cjs dangled after its V2 removed those files; under 0.12 knowledge check failed and knowledge edges exited 10, and the only fix was to cite a commit instead.

Current state

file: references are resolved against the working tree only.

Desired state

A historical file reference resolves through git; knowledge check reports it as historical, not dangling.

Scope

  • lib/knowledge.sh
  • share/schemas
  • docs/KNOWLEDGE.md
  • test/cases

Dependencies

None. This issue is a root of the graph.

Acceptance criteria

  • A record citing a since-deleted file at its commit passes knowledge check
  • A file reference that never existed still fails

Validation

  • bin/majordomus plan validate
  • MJ_TEST_JOBS=4 bash test/run.sh <the case this issue adds>

Evidence required

  • historical_file_reference_case

Evidence

coverstypecommandresultat commit
historical_file_reference_casetestMJ_TEST_JOBS=2 bash test/run.sh 3023_a_knowledge_record_outlives_the_file_it_cites && cargo test --locked --manifest-path apps/majordomus-cli/Cargo.toml --lib knowledge_basetests: 1 passed; test result: ok. 18 passed: shell and Rust resolve a deleted file through history and refuse one that never existed (run 2026-10-14 14:52Z on master 0dff496d1c plus this change)0dff496

Timeline

started
2026-10-14T14:53:04Z
verified
—
completed
2026-10-14T14:53:24Z

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I1987.yaml. Read it back with majordomus plan show I1987.

Searches the titles and descriptions of every page this site publishes.