Repository navigation
Pipeline evidence pointers are recorded as raw stage output_dir paths but resolved against the --pipeline dir: the documented relative layout verifies as missing (exit 6) (CR-A04-005) #374
Description
Wave 1 · theme D1-2: Audit chain, integrity manifest and verifier robustness · highest severity High · 1 finding(s) · effort medium
Summary
An operator copies the pipeline guide example, runs it, and wires verify-annex-iv --pipeline into CI. Every clean run raises exit 6, which the docs say means 'page the artefact owner'. The alarm gets suppressed, and real tampering is then missed.
Primary finding
CR-A04-005 — Pipeline evidence pointers are recorded as raw stage output_dir paths but resolved against the --pipeline dir: the documented relative layout verifies as missing (exit 6)
severity High · reachability default · intent contract-violation · confidence confirmed · independently confirmed · reproduced end to end
What happens. _run_single_stage records stage_state.training_manifest = os.path.join(stage_cfg.training.output_dir, 'compliance', ANNEX_IV basename) (cli/_pipeline.py:1644), relative to the training process's cwd or absolute; nothing normalises it. _resolve_stage_evidence_path (verify/_pipeline_evidence.py:233-249) joins relative pointers onto abspath(pipeline_dir) and accepts absolute ones unconditionally. The documented layout (pipeline.md:56-81, verify command at :238) resolves to <pipeline_dir>/<pipeline_dir>/..., _missing_evidence_outcome routes the absence to a violation and the run exits 6; absolute pointers bind to the original location, so copied archives verify the original's files and moved archives dangle.
Where.
forgelm/cli/_pipeline.py:1644(confirmed)forgelm/verify/_pipeline_evidence.py:233-243(relative join at 233-235, absolute passthrough at 242-243)forgelm/verify/_pipeline_evidence.py:298-321(_missing_evidence_outcome; VIOLATION return at 318-321)docs/guides/pipeline.md:56,64,72,81,238docs/reference/configuration.md:440-449(the cited 446-452 covers only part of it)forgelm/verify/_pipeline_evidence.py:242-249docs/reference/verify_annex_iv_subcommand.md:98forgelm/verify/_pipeline_evidence.py:233-243forgelm/verify/_pipeline_evidence.py:233forgelm/verify/_pipeline_evidence.py:352
Evidence.
- pipe/cfg3.yaml (relative ./pipeline_run, ./pipeline_run/s1, ./pipeline_run/s2): training EXIT=0; manifest pointers ['./pipeline_run/s1/compliance/annex_iv_metadata.json', './pipeline_run/s2/compliance/annex_iv_metadata.json']; verify-annex-iv --pipeline pipeline_run -> 'evidence at ... is missing' for both stages, EXIT=6. The same config with absolute paths (prun2) -> EXIT=0.
- With the secret set: t_copy (copy of prun2, intended_purpose edited in t_copy/s1/compliance/annex_iv_metadata.json) -> EXIT=0 'hash verified, 2 stage artefact(s)'. mv prun2 prun2_moved -> both stages 'missing' EXIT=6.
- annex_iv_metadata.json present on disk under pl_run2/s1/compliance and pl_run2/s2/compliance; verifier output lists both as missing.
Recommended fix. Record evidence pointers as absolute paths, or relative to pipeline.output_dir, at write time. Add an end-to-end test that runs a pipeline with relative output_dirs and then verifies it.
Acceptance criteria
- A regression test reproduces the failure scenario and asserts the corrected behaviour.
- Documentation listed above is corrected in English and in its Turkish mirror in the same PR.
- Every finding in this issue is resolved or explicitly closed with a reason.
Found by the October 2026 ForgeLM code and documentation review against commit cab2947. Code links point at that commit; line numbers may have moved since. Finding IDs (CR-…, DOC-…, TECH-…) are stable references for this backlog.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsTodo
Activity