Skip to content

fix(evidence): restrict recorded capture reads to the raw folder - #399

Merged
StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-351-raw-capture-boundary
Oct 14, 2026
Merged

StepenkoAnatoli merged 1 commit into
mainfrom
fix/issue-351-raw-capture-boundary

Conversation

@StepenkoAnatoli

Copy link
Copy Markdown
Owner

A Raw cell could make evidence-context read and print a private project file such as .env. Raw readers now validate paths before content access and restrict capture reads to research/raw by path and real path, with named missing/non-file diagnostics.

Fixes #351

what changed: Blocked private files, traversal and internal private-file links; named directory inputs. Migrated corpus and artifact recorded-path readers to projectFile and refused a non-file ledger before reading.

why: ADR-0109's accepted deferral explicitly requires the other two readers to move when a recorded-path defect fires the trigger. The implementation note records that completion. No alternative design was set aside.

what it touched: evidence-context/corpus/artifact libraries, regressions, their architecture rows, ADR-0109 note, changelog and research-kit README inventory.

what you verified: verified - red-first 90 passes, three expected failures and four unsupported file-symlink tests; then 93 passes, zero failures and the same four unsupported capabilities across evidence-context/corpus/artifact-producer. Private-file reads are counted as zero; both CLI text and JSON omit the sentinel. Handoff OK, preflight PASS, doctor READY collector/firecrawl-cli in this checkout. The standard full offline commit gate accepted aa1d673f66f364eab0230b1bfdc9c0a9ca02d3c0. Untested locally - real file links; CI exercises supported symlink capabilities.

what you got wrong and fixed: mistake - the architecture updater assumed every row ended with an ADR column. where - local documentation update. impact - the first update stopped before writing the map; no delivered PR was affected. cause - existing multiline and empty-ADR rows. fix - update responsibility prefixes. verified - all three rows changed, and the targeted tests passed with zero failures.

what changed: Evidence context validates recorded Raw paths before reading, refuses private project files/traversal/links leaving research/raw, and distinguishes directories from missing captures. ADR-0109's defect trigger also migrates corpus capture/Raw checks and artifact Raw/ledger readers to projectFile; a non-file ledger is refused before reading.

why: A Raw cell could print a project's private file into an agent context. The accepted ADR-0109 explicitly requires the other recorded-path readers to move when this deferral's defect trigger fires. No alternative design was set aside.

what it touched: evidence-context, corpus and artifact libraries; evidence-context and artifact-producer tests; all three architecture rows; ADR-0109 implementation note, changelog and research-kit README inventory.

what you verified: verified - red-first 90 passes, three expected failures and four unsupported file-symlink tests; then 93 passes, zero failures and the same four unsupported capabilities across evidence-context/corpus/artifact-producer. Direct/traversal private paths cause zero private reads and no text/JSON disclosure; directories and non-file ledgers are named. Handoff OK, preflight PASS, doctor READY collector/firecrawl-cli in this checkout. Untested locally - real file links; the CI matrix exercises supported symlink capabilities. The required full offline suite runs in the commit gate before acceptance.

what you got wrong and fixed: mistake - the documentation updater assumed every architecture row ended with an ADR column. where - the local architecture-update step. impact - its first attempt stopped before writing the map; no delivered PR was affected. cause - the existing corpus row spans lines and the evidence-context row has an empty ADR cell. fix - update each module's responsibility prefix and record the expired deferral. verified - all three rows changed and git diff --check passed; the targeted code checks remain 93 passes, zero failures and four unsupported capabilities.
@StepenkoAnatoli
StepenkoAnatoli merged commit 0dc3ff0 into main Oct 14, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the fix/issue-351-raw-capture-boundary branch October 14, 2026 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

evidence-context reads and prints any project file a Raw cell names, .env included, despite its read-only promise

1 participant