Interface PipelineStateStore
- All Known Implementing Classes:
FileSystemPipelineStateStore
public interface PipelineStateStore
Persistence layer for the code-review pipeline (TNS-291).
Owns the canonical disk layout (deepsec-shaped):
data/<projectId>/
├── project.json # project metadata
├── files/
│ ├── <hash>.json # one FileRecord per file (keyed by path hash)
├── runs/
│ ├── <runId>.json # stage-execution audit trail
└── reports/
├── findings.sarif # exporter output
└── ...
Implementations MUST be safe for concurrent reads and serialise
writes per FileRecord (one writer at a time per path) so
stages can fan-out across files without corrupting each other.
- Since:
- 0.10.0 (TNS-291)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordAudit-trail entry for one stage execution. -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend a stage-execution entry to the run log.Look up a record by its relative path.voidinitProject(String projectId, Path projectRoot) Initialise (or open) project state underprojectId.All records currently stored for the project, in deterministic order.All run-log entries forstage, oldest first.voidsaveFile(FileRecord record) Persist aFileRecordfor the file atrecord.path().voidwriteReport(String name, byte[] content) Write a binary report (findings.sarif,findings.md, …) underreports/.
-
Method Details
-
initProject
Initialise (or open) project state underprojectId. Creates the disk layout if missing; idempotent. -
saveFile
Persist aFileRecordfor the file atrecord.path(). Subsequent reads return this record until the next write. -
getFile
Look up a record by its relative path. -
listFiles
List<FileRecord> listFiles()All records currently stored for the project, in deterministic order. -
appendRun
Append a stage-execution entry to the run log. Used by stages to record theirStageResultfor thereportstage. -
listRuns
All run-log entries forstage, oldest first. -
writeReport
Write a binary report (findings.sarif,findings.md, …) underreports/. Overwrites any existing file with the same name.
-