v0.6.0: Proactive provenance (run-record + node runner) + LaTeX paper standard#12
v0.6.0: Proactive provenance (run-record + node runner) + LaTeX paper standard#12hebbianloop wants to merge 4 commits into
Conversation
Make the Glimmer graph executable, not just descriptive. The agentic loop
(docs/agentic-loop.md) was specified but had no runtime primitive; the only
"verification" script re-hashed files on disk ("not a full re-run").
Core schema (v0.5.1 → v0.6.0):
- new `run-record` node type: one concrete, replayable invocation (PROV Activity)
with a planned → ready → running → executed lifecycle, binding a method + pinned,
standard-validated inputs + expected outputs + command + container digest + a
runner-written verdict. The executable unit of the agentic loop.
- edges reruns/consumes/regenerates/emits (+ inverse regenerated-by); broaden
tests-hypothesis/addresses-concept to allow a run-record source.
- method-registry affordances: registry-ref + implements/equivalent-to/refines.
- standard.validator hint for the runtime gate.
Runner (glimmer/tools/run.py + `glimmer run` / `glimmer rerun`):
- pre-run standards gate (inputs pinned AND valid; validation delegated to each
standard's validator or glimmer validate).
- datalad containers-run replay (feature-detected; degrades honestly).
- three verification tiers: byte-identical (NIfTI/GIFTI/JSON normalization),
numeric-within-tolerance (re-derive published numbers), structural (agent/LLM).
- certify_equivalence, dependency-ordered `all`, provenance manifest, verdict
writeback.
Validator: run-record field/edge/target/lifecycle checks + agent-protocol rule.
Worked example: examples/synthetic-provenance/ exercises the loop + all three
tiers + the gate + equivalence, with no real data and no heavy deps.
Docs: new docs/proactive-provenance.md; agentic-loop.md made executable; roadmap
(federation → v0.7, registry/minimal-path folded in); README repositioned as
AI-native reproducibility; agent-protocol + datalad-pattern cross-linked.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add docs/paper-draft.md — a working manuscript (no journal boilerplate) extending "Reproducibility as Knowledge Graph Navigation" to proactive provenance: the executable run-record + node runner, the standards gate, the three verification tiers, runtime-certified method equivalence, and the agentic loop made executable. Point paper-citation.md at it and bump the software citation version to 0.6.0. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Establish LaTeX as the standard for submittable Glimmer papers: - papers/glimmer-paper.cls — venue-neutral house document class (preprint/draft banners, title-block macros; preloads amsmath/hyperref/natbib/booktabs/…). - papers/README.md — the convention + build instructions; papers/.gitignore for TeX artifacts. - papers/01-knowledge-graph-navigation/ — Paper 1, scoped to v0.5 (the graph as a navigable substrate; verification as a validator-enforced contract, the executable runner named as forthcoming). Preprint candidate. Compiles to 9pp. - papers/02-proactive-provenance/ — Paper 2 (v0.6): the run-record + node runner, standards gate, three verification tiers, certified equivalence. LaTeX port of docs/paper-draft.md. Compiles to 7pp. Both build with `make` (latexmk + bibtex) against the shared class. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
hebbianloop
left a comment
There was a problem hiding this comment.
Review — v0.6 proactive provenance (runner + run-record)
I reviewed the branch and ran the worked example end-to-end (emit_graph → validate → run → rerun --manifest → negative controls). It works: forward run executes all four, rerun gives verified (byte-identical) ×2, reproduced-within-tolerance (classifier), structurally-valid (agent), and gate-failed on the malformed-input negative control. The three-tier design, the delegated standards gate, the honest-degradation discipline (never a silent pass), and the importable public surface are all solid. This is the runner the whole effort needed — recommend merge after the items below.
High (correctness / claims)
datalad containers-runpath is untested and likely misuses the API.execute()callscontainers-run -n f"{image}@{digest}", but-nexpects a registered container name, notimage@digest. Every run-record in the worked example is a plainpython3 ...command with nocontainer-digest, so the headline result runs entirely via the host-subprocess fallback — the pinned-container replay path (the center of the reproducibility argument, and of Paper 02) is never exercised. Please add a container-backed example that actually drivescontainers-run, fix the invocation to register/resolve the container, and soften the paper claim until a container path is demonstrated.- Command splitting. The datalad paths use
cmd.split()(whitespace), which breaks quoted args or paths with spaces; the host path usesshell=True. Inconsistent and fragile for real commands (FSL/Nipype with real paths). Useshlex.split()for the argv paths. normalized_hashsuffix detection."".join(path.suffixes)misfires on filenames containing dots (e.g.sub-01.run-1.nii.gz→.run-1.nii.gz, no match → silent fallback to raw hash → false mismatch on volatile headers, defeating byte-identical verification). Usename.lower().endswith((".nii", ".nii.gz", ".gii", ".json")).
Medium
run_root = rokb.parentis a layout assumption. If the rokb dir is the project root (code/inputs/out as siblings of the index), run_root points one level too high and all relative paths break; the guard only catches filesystem root. Make it explicit or detectcode/.- "reproducibility-rate-pct" semantics. Forward
runmarks everythingexecuted→ 100% regardless of reproduction;rerun allcounts the deliberate gate-fail negative control against the rate (I observed 80%). The metric conflates execution, reproduction, and correct-negative behavior. Report separate counts and exclude negative controls; make the paper's "100%" precise (4/4 on the positive set). - Federation security (roadmap flag).
execute()/validators run graph-supplied strings viashell=True. Fine for a local trusted graph, but the v0.7 cross-project/federation direction means pulling run-records from other projects — executing those is arbitrary code execution. Federated run-records need sandboxing / explicit approval; note it now so the governance layer accounts for it.
Low / polish
write_verdict_backreloads the whole graph per node, and the CLI reloads again after each writeback → O(N²) sidecar parses with--write-verdict. Cache paths.- Dead expression:
pin if "output-path" in pin else {**pin, "output-path": pin.get("output-path")}(both branches equivalent). validatewarns "dataset has no produced-by edge" on the synthetic raw input datasets — suppress for declared-raw inputs (or mark them) so the example validates clean.- "contract" wording. The v0.6 docs lean on "executable contract / self-checking contract"; per the review on glimmer-web#19 we're dropping "contract" in prose. Mechanism stays; rename in
proactive-provenance.md+schema.md.
Alignment
This is exactly the direction: registry-ref / equivalent-to / certify_equivalence are the seeds of the v0.7 recomputation-avoidance + federation layer. The integration seam with the ADS-side tooling is clear: the planner's runnable frontier (glimmer_sequence.py --frontier) should emit run-records that glimmer run executes. None of the above blocks merge; #1–#3 are the ones I'd fix before leaning on the reproducibility claim in the papers.
Summary
Makes the Glimmer graph executable, not just descriptive, and establishes a LaTeX standard for submittable papers.
The agentic loop (
docs/agentic-loop.md) was specified but had no runtime primitive; the only "verification" script re-hashed files on disk ("not a full re-run"). This PR closes that gap with one core node type and one tool, and lands two manuscripts.Schema (v0.5.1 → v0.6.0)
run-recordcore node type — one concrete, replayable invocation (PROVActivity) with aplanned → ready → running → executedlifecycle, binding a method + pinned, standard-validated inputs + expected outputs + command + container digest + a runner-written verdict. The executable unit of the agentic loop.reruns/consumes/regenerates/emits(+ inverseregenerated-by);tests-hypothesis/addresses-conceptallowed from a run-record.registry-ref+implements/equivalent-to/refines.standard.validatorhint for the runtime gate.Runner —
glimmer/tools/run.py(glimmer run/glimmer rerun)datalad containers-runreplay (feature-detected; degrades honestly).certify_equivalence, dependency-orderedall, provenance manifest, verdict writeback.Validator, example, docs
validate.py: run-record field/edge/target/lifecycle checks + agent-protocol rule.examples/synthetic-provenance/: exercises the loop + all three tiers + the gate + equivalence, no real data / no heavy deps.docs/proactive-provenance.md;agentic-loop.mdmade executable; roadmap renumbered (federation → v0.7, registry/minimal-path folded in); README repositioned as AI-native reproducibility; agent-protocol + datalad-pattern cross-linked.Papers (new LaTeX standard)
papers/glimmer-paper.cls— venue-neutral house class;papers/README.mddocuments the convention.01-knowledge-graph-navigation/) — scoped to v0.5: the graph as a navigable substrate; verification as a validator-enforced contract, the executable runner named as forthcoming. Preprint candidate (9pp).02-proactive-provenance/) — v0.6: the run-record + node runner (7pp). LaTeX port ofdocs/paper-draft.md.Verification
glimmer validateon the synthetic example: 0 errors.glimmer rerun … all→ 100% (verified ×2, reproduced-within-tolerance, structurally-valid).ds000114-nipypevalidates unchanged.make(latexmk + bibtex), no undefined references.🤖 Generated with Claude Code