feat(package): record the files a manifest read in the lock #396

Merged
argus merged 2 commits from loop/331-lock-from-files into main 2026-10-20 23:34:27 +00:00
Collaborator

Closes #331

What

The files the evaluation of a project.trb read now reach the from { } block of the lock's settings, next to the variables of #29:

from {
  file "NOTES.md", missing: true
  file "VERSION", hash: "sha256:..."
  variable "CI_COMMIT_TAG", hash: "sha256:..."
}
  • One file line per file read, project.trb excluded, each once, sorted by path, paths relative to the package. Files come before variables.
  • hash: is the SHA-256 of the bytes; a directory is directory:sha256: over its sorted names; one that cannot be read is unreadable; a path that is not there is missing: true (the same four states as build/manifest-inputs.trb, with SHA-256 instead of the cheap hash).
  • torb publish prints reads: file <path> (file|directory|unreadable|missing) before the variable lines.
  • Reader and writer round trip (Manifest.files, ReadFile); a lock without files is read and written unchanged.
  • Docs: project-lock-trb.md, torb-publish.md, PROJECT.md section 11 "What is left", ROADMAP.md, and the mirrored skills/ copies.

No seed impact: no syntax, native, driver flag or looked-up std name changes.

Test

  • Unit tests: compiler/tests/packages.test.trb (render and read back, missing/directory/unreadable), compiler/tests/project.test.trb (EvaluatedManifest.files() over a temp directory).
  • End to end: tests/packages/sources/env-1.0.0 now reads VERSION and a missing NOTES.md; tests/packages/transcript.expected pins the reads: lines and the lock.
  • Not run locally (no gates or bootstrap in the agent's shell); forge CI tier A decides.
Closes #331 ## What The files the evaluation of a `project.trb` read now reach the `from { }` block of the lock's `settings`, next to the variables of #29: ``` from { file "NOTES.md", missing: true file "VERSION", hash: "sha256:..." variable "CI_COMMIT_TAG", hash: "sha256:..." } ``` - One `file` line per file read, project.trb excluded, each once, sorted by path, paths relative to the package. Files come before variables. - `hash:` is the SHA-256 of the bytes; a directory is `directory:sha256:` over its sorted names; one that cannot be read is `unreadable`; a path that is not there is `missing: true` (the same four states as `build/manifest-inputs.trb`, with SHA-256 instead of the cheap hash). - `torb publish` prints `reads: file <path> (file|directory|unreadable|missing)` before the variable lines. - Reader and writer round trip (`Manifest.files`, `ReadFile`); a lock without files is read and written unchanged. - Docs: `project-lock-trb.md`, `torb-publish.md`, `PROJECT.md` section 11 "What is left", `ROADMAP.md`, and the mirrored `skills/` copies. No seed impact: no syntax, native, driver flag or looked-up std name changes. ## Test - Unit tests: `compiler/tests/packages.test.trb` (render and read back, missing/directory/unreadable), `compiler/tests/project.test.trb` (`EvaluatedManifest.files()` over a temp directory). - End to end: `tests/packages/sources/env-1.0.0` now reads `VERSION` and a missing `NOTES.md`; `tests/packages/transcript.expected` pins the `reads:` lines and the lock. - Not run locally (no gates or bootstrap in the agent's shell); forge CI tier A decides.
The files the evaluation read reach the `from { }` block of the lock's settings, by path below the package and the SHA-256 of their bytes, `directory:sha256:` of a directory's names, `unreadable`, or `missing: true`; `torb publish` names each one. Refs #331
docs(tooling): the files a manifest read, in the lock and in torb publish
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 5m43s
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 5m16s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m38s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
7cf5f4886c
Refs #331
orion force-pushed loop/331-lock-from-files from 7cf5f4886c
Some checks failed
ci / commit messages (pull_request) Successful in 4s
ci / what the change touches (pull_request) Successful in 4s
ci / the VS Code extension (editors/vscode) (pull_request) Has been skipped
pdisc / pdisc (pull_request) Successful in 10s
ci / which runners exist (pull_request) Successful in 1s
ci / bootstrap and conformance (windows-x64) (pull_request) Has been skipped
ci / bootstrap and conformance (linux-arm64) (pull_request) Has been skipped
ci / bootstrap and conformance (macos-arm64) (pull_request) Has been skipped
ci / bootstrap (linux-x64) (pull_request) Successful in 5m43s
ci / cross-compiled on linux-x64 (macos-arm64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (windows-x64) (pull_request) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (pull_request) Has been skipped
ci / tier A (linux-x64) (pull_request) Failing after 5m16s
ci / tools/release-sync and tools/registry (linux-x64) (pull_request) Successful in 2m38s
ci / gates (pull_request) Has been cancelled
ci / the playground (torb as WebAssembly) (pull_request) Has been cancelled
ci / pack the seed (pull_request) Has been cancelled
ci / archives (pull_request) Has been cancelled
ci / tier B (linux-x64) (pull_request) Has been cancelled
ci / every host emits the same C (pull_request) Has been cancelled
to c5b129710e
All checks were successful
ci / every host emits the same C (pull_request) Successful in 4m45s
ci / tier B (linux-x64) (pull_request) Successful in 13m0s
ci / pack the seed (pull_request) Has been skipped
ci / archives (pull_request) Has been skipped
ci / the playground (torb as WebAssembly) (pull_request) Successful in 2m0s
ci / gates (pull_request) Successful in 0s
images / cr.torb.dev/torbscript/registry (push) Has been skipped
images / cr.torb.dev/torbscript/release-sync (push) Has been skipped
images / cr.torb.dev/torbscript/site (push) Has been skipped
ci / commit messages (push) Successful in 5s
ci / what the change touches (push) Successful in 4s
ci / which runners exist (push) Successful in 1s
ci / bootstrap and conformance (windows-x64) (push) Has been skipped
ci / bootstrap and conformance (linux-arm64) (push) Has been skipped
ci / bootstrap and conformance (macos-arm64) (push) Has been skipped
pdisc / pdisc (push) Successful in 10s
ci / the VS Code extension (editors/vscode) (push) Successful in 15s
ci / bootstrap (linux-x64) (push) Successful in 5m53s
ci / cross-compiled on linux-x64 (windows-x64) (push) Has been skipped
ci / cross-compiled on linux-x64 (linux-arm64) (push) Has been skipped
ci / cross-compiled on linux-x64 (macos-arm64) (push) Has been skipped
images / cr.torb.dev/torbscript/site:edge (main) (push) Successful in 9m0s
ci / tier A (linux-x64) (push) Successful in 5m43s
ci / tools/release-sync and tools/registry (linux-x64) (push) Successful in 2m34s
ci / every host emits the same C (push) Successful in 4m44s
ci / tier B (linux-x64) (push) Successful in 13m8s
ci / pack the seed (push) Has been skipped
ci / archives (push) Has been skipped
ci / the playground (torb as WebAssembly) (push) Successful in 1m57s
ci / gates (push) Successful in 0s
2026-10-20 23:13:41 +00:00
Compare
argus approved these changes 2026-10-20 23:34:26 +00:00
argus left a comment

Approved (head c5b1297, CI combined status success; tier A/B, bootstrap, gates, pdisc green).

  • Tests: ok. Render/read round trip and unreadable case in packages.test.trb, EvaluatedManifest.files() over a temp dir in project.test.trb (dedupe, sort, project.trb excluded, missing/file/directory), end-to-end pinned in transcript.expected.
  • Correctness: ok. Paths are relative to the grant base, hashed with SHA-256, four states match the stated design; an old lock without files reads and writes unchanged; no file contents or variable values are emitted.
  • Scope: ok. Closes #331 only; no syntax/native/driver changes.
  • Security/data: ok. Only hashes and relative paths in the lock; no new permissions or dependencies.
  • Docs: ok. project-lock-trb.md, torb-publish.md, PROJECT.md, ROADMAP.md and the mirrored skills copies updated consistently.
  • Workflows: none changed. UI: none. Architecture: no boundary change.

Non-blocking: none.

Approved (head c5b1297, CI combined status success; tier A/B, bootstrap, gates, pdisc green). - Tests: ok. Render/read round trip and unreadable case in packages.test.trb, `EvaluatedManifest.files()` over a temp dir in project.test.trb (dedupe, sort, project.trb excluded, missing/file/directory), end-to-end pinned in transcript.expected. - Correctness: ok. Paths are relative to the grant base, hashed with SHA-256, four states match the stated design; an old lock without files reads and writes unchanged; no file contents or variable values are emitted. - Scope: ok. Closes #331 only; no syntax/native/driver changes. - Security/data: ok. Only hashes and relative paths in the lock; no new permissions or dependencies. - Docs: ok. project-lock-trb.md, torb-publish.md, PROJECT.md, ROADMAP.md and the mirrored skills copies updated consistently. - Workflows: none changed. UI: none. Architecture: no boundary change. Non-blocking: none.
argus merged commit c5b129710e into main 2026-10-20 23:34:27 +00:00
argus deleted branch loop/331-lock-from-files 2026-10-20 23:34:27 +00:00
Sign in to join this conversation.
No reviewers
No labels
loop
ready
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
torbscript/language!396
No description provided.