Add explicit read-only mixed source8 CLI checking
This commit is contained in:
@@ -64,3 +64,43 @@ are not a claim of interactive performance at the maximum project size.
|
||||
|
||||
For the notation itself, start with [the text-first examples](../examples/text-first/README.md)
|
||||
and the [language contract](language.rst).
|
||||
|
||||
|
||||
## Read-only mixed source8 checking
|
||||
|
||||
```sh
|
||||
arcadia check-mixed path/to/main.arcadia --json
|
||||
```
|
||||
|
||||
Use `check-mixed` for source8 containing ordinary declarations and typed analysis
|
||||
(quantity kinds, units, calculations, properties, checks and cases). Every
|
||||
project, ordinary declaration, typed definition and scoped parameter must have
|
||||
an explicit UUID. This command does not migrate older headers, allocate UUIDs,
|
||||
format, preview edits or save. `--write` is a usage error. Existing `check`,
|
||||
`lint`, `stabilize` and `rename-alias` retain their ordinary-source behavior.
|
||||
|
||||
The loader discovers actual includes with the source grammar and existing
|
||||
portable-path, regular-file, bounded-read and pending-journal checks. It captures
|
||||
original bytes, runs a bounded discovery syntax pass, then checks the complete
|
||||
borrowed bundle in a separate bounded verification pass. A discovery diagnostic
|
||||
prevents complete verification; the first mixed syntax/work failure stops
|
||||
further discovery parsing. Both passes derive limits from the same CLI policy;
|
||||
numeric work is bounded per pass, not once across the whole command. Logical
|
||||
producer limits are not a bound on all allocations or process memory.
|
||||
|
||||
The format-1 JSON envelope uses operation `check-mixed`, status `checked` or
|
||||
`invalid` for completed source checking, and existing `rejected` for direct disk
|
||||
errors. `changes` is empty, `written` is false, `identities_to_stabilize` is zero,
|
||||
`migration` is null and `notes` is empty. Located diagnostics refer to original
|
||||
`input` bytes, with half-open UTF-8 byte spans and one-based Unicode-scalar
|
||||
line/column coordinates. Direct filesystem failures use the existing operation
|
||||
coordinate space. Engineering warnings permit exit 0; invalid source/semantics
|
||||
exit 1, usage exits 2, and disk/path/missing-file/pending-journal failures exit 3.
|
||||
Invalid UTF-8 discovery diagnostics retain the existing source-error exit 1.
|
||||
|
||||
Human output goes to stderr and ends with `checked: mixed source8 check; no files
|
||||
changed` on success, after any warnings. No source bytes or directory entries
|
||||
are written, and pending saves are never recovered implicitly. Checking captured
|
||||
bytes does not establish an atomic multi-file snapshot against concurrent writers.
|
||||
This command provides validation only; mixed editing, adoption, GUI and history
|
||||
integration remain outside this interface.
|
||||
|
||||
Reference in New Issue
Block a user