Release 1.0.0-beta.22 run manifest execution report hardening
This commit is contained in:
parent
87e627045e
commit
7f71beac4c
71
.llm/BETA_22_RUN_MANIFEST_AND_EXECUTION_REPORT_HARDENING.md
Normal file
71
.llm/BETA_22_RUN_MANIFEST_AND_EXECUTION_REPORT_HARDENING.md
Normal file
@ -0,0 +1,71 @@
|
||||
# 1.0.0-beta.22 Run Manifest And Execution Report Hardening
|
||||
|
||||
## Scope
|
||||
|
||||
`1.0.0-beta.22` is a compiler/tooling evidence-hardening slice for
|
||||
`glagol run --manifest`. It keeps the Slovo source language, typed core,
|
||||
runtime capabilities, standard-library surface, compiler-known runtime names,
|
||||
ABI/layout policy, and package behavior unchanged.
|
||||
|
||||
The release adds an additive run-report block to run-mode artifact manifests
|
||||
so manifest evidence can record:
|
||||
|
||||
- process exit status for the invoked program
|
||||
- captured stdout from the run
|
||||
- captured stderr from the run
|
||||
- forwarded program arguments passed through `glagol run`
|
||||
|
||||
## Contract
|
||||
|
||||
When `glagol run --manifest <path>` completes far enough to write an artifact
|
||||
manifest, the manifest should include run execution evidence in addition to the
|
||||
existing schema marker, command, mode, success, diagnostics metadata, primary
|
||||
output, and artifacts fields.
|
||||
|
||||
The run-report data describes the native executable invocation performed by
|
||||
`glagol run`, not a new source-language or runtime feature. Captured stdout
|
||||
and stderr are evidence fields for tooling and release-gate review; they do
|
||||
not redefine ordinary terminal behavior. Forwarded args are recorded so
|
||||
fixtures can distinguish compiler arguments from user-program arguments.
|
||||
|
||||
The block is additive beta tooling metadata. It is not a stable public schema
|
||||
freeze and does not bump `slovo.artifact-manifest` version `1`.
|
||||
|
||||
## Non-Scope
|
||||
|
||||
This scope does not add:
|
||||
|
||||
- source-language syntax
|
||||
- standard-library helpers
|
||||
- compiler-known `std.*` runtime names
|
||||
- runtime C capabilities
|
||||
- package, workspace, import, or registry behavior
|
||||
- stable artifact-manifest schema freeze
|
||||
- stable Markdown schema freeze
|
||||
- LSP, watch, SARIF, or daemon protocols
|
||||
- performance claims
|
||||
- stable ABI/layout
|
||||
- beta maturity beyond the existing `1.0.0-beta` line
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- `glagol run --manifest <path>` writes an artifact manifest with an additive
|
||||
run-report block after executing a supported program.
|
||||
- The run report records exit status, captured stdout, captured stderr, and
|
||||
forwarded args.
|
||||
- Existing manifest fields and schema/version markers remain compatible with
|
||||
the beta artifact-manifest contract.
|
||||
- Non-run modes do not need run-report metadata.
|
||||
- Documentation describes beta22 as tooling/CLI evidence hardening only.
|
||||
- Release notes and roadmaps state that beta22 does not add language or
|
||||
stdlib features and does not freeze the manifest schema.
|
||||
|
||||
## Suggested Gates
|
||||
|
||||
```bash
|
||||
cargo fmt --check
|
||||
cargo test --test run_manifest_beta22
|
||||
cargo test --test cli_v1_1
|
||||
./scripts/release-gate.sh
|
||||
git diff --check
|
||||
```
|
||||
45
.llm/reviews/BETA_22_RELEASE_REVIEW.md
Normal file
45
.llm/reviews/BETA_22_RELEASE_REVIEW.md
Normal file
@ -0,0 +1,45 @@
|
||||
# Beta22 Release Review
|
||||
|
||||
Verdict: PASS with notes.
|
||||
|
||||
## Findings
|
||||
|
||||
No blocking or non-blocking findings in the reviewed scope.
|
||||
|
||||
## Scope Reviewed
|
||||
|
||||
- `compiler/src/main.rs` run manifest rendering and exit behavior.
|
||||
- `compiler/tests/run_manifest_beta22.rs` focused coverage.
|
||||
- `.llm/BETA_22_RUN_MANIFEST_AND_EXECUTION_REPORT_HARDENING.md` beta22 contract and suggested gates.
|
||||
- `README.md`, `docs/compiler/RELEASE_NOTES.md`, `docs/compiler/ROADMAP.md`, `docs/language/RELEASE_NOTES.md`, `docs/language/ROADMAP.md`, and `docs/language/SPEC-v1.md` release claims.
|
||||
- `scripts/release-gate.sh` inclusion.
|
||||
|
||||
## Acceptance Checklist
|
||||
|
||||
- PASS: `glagol run --manifest <path>` writes additive run execution evidence after a supported program executes. The run path captures child stdout/stderr/status before manifest rendering and exits with the child status in `compiler/src/main.rs:892` through `compiler/src/main.rs:918`; rendering emits `(run-report ...)` in `compiler/src/main.rs:2162` through `compiler/src/main.rs:2188`.
|
||||
- PASS: Run-report records exit status, captured stdout, captured stderr, and forwarded args. Tests cover success stdout and args in `compiler/tests/run_manifest_beta22.rs:10` through `compiler/tests/run_manifest_beta22.rs:60`, and nonzero exit plus stderr preservation in `compiler/tests/run_manifest_beta22.rs:62` through `compiler/tests/run_manifest_beta22.rs:128`.
|
||||
- PASS: Existing manifest fields and schema/version markers remain compatible. The new path passes `Some(run_report)` only through the run-specific wrapper in `compiler/src/main.rs:2019` through `compiler/src/main.rs:2043`; the renderer still emits `slovo.artifact-manifest` version `1` in `compiler/src/main.rs:2067` through `compiler/src/main.rs:2069`.
|
||||
- PASS: Source failures do not receive fake run evidence. The focused test asserts no run-report for a type failure in `compiler/tests/run_manifest_beta22.rs:130` through `compiler/tests/run_manifest_beta22.rs:161`.
|
||||
- PASS: Non-run modes are outside the run-report requirement. Existing foreign-import/project manifest wrappers pass `None` for the run-report slot in `compiler/src/main.rs:1992` through `compiler/src/main.rs:2017`; beta22 docs state this explicitly in `.llm/BETA_22_RUN_MANIFEST_AND_EXECUTION_REPORT_HARDENING.md:58` and `docs/compiler/RELEASE_NOTES.md:35`.
|
||||
- PASS: Documentation does not overclaim language, stdlib, runtime, package, ABI, or stable manifest-schema changes. Representative deferrals are present in `README.md:172` through `README.md:178`, `docs/compiler/ROADMAP.md:118` through `docs/compiler/ROADMAP.md:124`, `docs/language/RELEASE_NOTES.md:52` through `docs/language/RELEASE_NOTES.md:62`, `docs/language/ROADMAP.md:99` through `docs/language/ROADMAP.md:106`, and `docs/language/SPEC-v1.md:260` through `docs/language/SPEC-v1.md:267`.
|
||||
- PASS: The beta22 contract suggested gate names match the implemented focused test and release gate. `.llm/BETA_22_RUN_MANIFEST_AND_EXECUTION_REPORT_HARDENING.md:63` through `.llm/BETA_22_RUN_MANIFEST_AND_EXECUTION_REPORT_HARDENING.md:71` lists `cargo test --test run_manifest_beta22`; `scripts/release-gate.sh:75` includes the same focused test.
|
||||
|
||||
## Verification
|
||||
|
||||
Ran:
|
||||
|
||||
```bash
|
||||
cargo test --test run_manifest_beta22
|
||||
```
|
||||
|
||||
Result: passed, 3 tests passed.
|
||||
|
||||
Recommended before release tag:
|
||||
|
||||
```bash
|
||||
cargo fmt --check
|
||||
./scripts/release-gate.sh
|
||||
git diff --check
|
||||
```
|
||||
|
||||
Note: the focused hosted-run tests depend on Clang discovery, matching existing project patterns. In this local run they executed and passed rather than skipping.
|
||||
39
README.md
39
README.md
@ -6,7 +6,7 @@ This repository is the canonical public monorepo for the language design,
|
||||
standard library source, compiler, runtime, examples, benchmarks, and technical
|
||||
documents.
|
||||
|
||||
Current release: `1.0.0-beta.21`.
|
||||
Current release: `1.0.0-beta.22`.
|
||||
|
||||
## Repository Layout
|
||||
|
||||
@ -24,7 +24,7 @@ scripts/ local release and document tooling
|
||||
|
||||
## Beta Scope
|
||||
|
||||
`1.0.0-beta.21` keeps the `1.0.0-beta` language baseline, includes the
|
||||
`1.0.0-beta.22` keeps the `1.0.0-beta` language baseline, includes the
|
||||
`1.0.0-beta.1` tooling/install hardening slice, the `1.0.0-beta.2`
|
||||
runtime/resource foundation bundle, the `1.0.0-beta.3` standard-library
|
||||
stabilization bundle, the `1.0.0-beta.4` language-usability diagnostics
|
||||
@ -43,7 +43,8 @@ the `1.0.0-beta.17` JSON primitive scalar parsing foundation, the
|
||||
`1.0.0-beta.18` JSON string token parsing foundation, the
|
||||
`1.0.0-beta.19` test discovery and user-project conformance foundation, the
|
||||
`1.0.0-beta.20` string search and ASCII trim foundation, and the
|
||||
`1.0.0-beta.21` JSON document scalar parsing foundation.
|
||||
`1.0.0-beta.21` JSON document scalar parsing foundation, plus the
|
||||
`1.0.0-beta.22` run manifest and execution report hardening slice.
|
||||
The language baseline supports practical local command-line, file, and
|
||||
loopback-network programs with:
|
||||
|
||||
@ -74,6 +75,11 @@ structs, enums, functions, tests, source spans, and workspace package names.
|
||||
API sections for local package and module documentation: exact exported
|
||||
function signatures, exported struct fields, exported enum variants and payload
|
||||
types, non-export filtering, and module-local alias normalization.
|
||||
The `1.0.0-beta.22` tooling slice adds an additive run-report block to
|
||||
`glagol run --manifest` artifact manifests so local evidence can record the
|
||||
program exit status, captured stdout, captured stderr, and forwarded program
|
||||
arguments. This is beta CLI evidence hardening only: it does not add language
|
||||
or stdlib features and does not freeze the artifact-manifest schema.
|
||||
The `1.0.0-beta.12` vector parity slice adds source-authored helper coverage
|
||||
only: `std.vec_i64` gains `count_of`, `starts_with`, `without_prefix`,
|
||||
`ends_with`, and `without_suffix`, while `std.vec_f64` gains `count_of`.
|
||||
@ -163,10 +169,19 @@ tokenizer objects, maps/sets, streaming, Unicode escape decoding beyond the
|
||||
existing string-token behavior, embedded NUL policy, stable ABI/layout, or a
|
||||
stable stdlib/API freeze.
|
||||
|
||||
The `1.0.0-beta.22` run manifest and execution report hardening slice extends
|
||||
`glagol run --manifest` artifact manifests with additive run-report evidence:
|
||||
the executed program's exit status, captured stdout, captured stderr, and
|
||||
forwarded user-program arguments. This release does not add source-language
|
||||
syntax, standard-library helpers, compiler-known runtime names, runtime
|
||||
capabilities, package behavior, stable artifact-manifest schema guarantees,
|
||||
stable ABI/layout, or a stable stdlib/API freeze.
|
||||
|
||||
Still deferred before stable: executable generics, generic aliases, maps/sets,
|
||||
broad package registry semantics, stable Markdown schema, stable stdlib/API
|
||||
compatibility freeze, DNS/TLS/async networking, LSP/watch guarantees, SARIF
|
||||
and daemon protocols, stable `1.0.0` diagnostics freeze,
|
||||
broad package registry semantics, stable artifact-manifest schema, stable
|
||||
Markdown schema, stable stdlib/API compatibility freeze, DNS/TLS/async
|
||||
networking, LSP/watch guarantees, SARIF and daemon protocols, stable `1.0.0`
|
||||
diagnostics freeze,
|
||||
re-exports/globs/hierarchical modules, mutable vectors, slice/view APIs,
|
||||
iterators, additional compiler-known runtime names, stable ABI and layout,
|
||||
performance claims, stable benchmark JSON metadata schema, and runtime changes
|
||||
@ -467,6 +482,18 @@ objects, maps/sets, streaming, Unicode escape decoding beyond the existing
|
||||
string-token behavior, embedded NUL policy, new compiler-known runtime names,
|
||||
stable ABI/layout, or stable stdlib/API semantics.
|
||||
|
||||
## 1.0.0-beta.22 Run Manifest And Execution Report Hardening
|
||||
|
||||
The `1.0.0-beta.22` scope hardens `glagol run --manifest` evidence by adding
|
||||
an additive run-report block to run-mode artifact manifests. The block records
|
||||
the executed program's exit status, captured stdout, captured stderr, and
|
||||
forwarded program arguments.
|
||||
|
||||
This is tooling/CLI evidence work only. It does not add language syntax,
|
||||
stdlib helpers, compiler-known runtime names, runtime C capabilities, package
|
||||
or import behavior, stable artifact-manifest schema guarantees, stable
|
||||
ABI/layout, or stable stdlib/API semantics.
|
||||
|
||||
## 1.0.0-beta.15 Reserved Generic Collection Boundary Hardening And Collection Ledger
|
||||
|
||||
The `1.0.0-beta.15` release documents the current concrete collection and
|
||||
|
||||
2
compiler/Cargo.lock
generated
2
compiler/Cargo.lock
generated
@ -4,4 +4,4 @@ version = 3
|
||||
|
||||
[[package]]
|
||||
name = "glagol"
|
||||
version = "1.0.0-beta.21"
|
||||
version = "1.0.0-beta.22"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "glagol"
|
||||
version = "1.0.0-beta.21"
|
||||
version = "1.0.0-beta.22"
|
||||
edition = "2021"
|
||||
description = "Glagol, the first compiler for the Slovo language"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
@ -892,14 +892,15 @@ fn run_native_from_llvm(
|
||||
let _ = io::stdout().write_all(&run_output.stdout);
|
||||
let _ = io::stderr().write_all(&run_output.stderr);
|
||||
let stdout = String::from_utf8_lossy(&run_output.stdout).to_string();
|
||||
write_manifest_if_requested_with_foreign_imports(
|
||||
let stderr = String::from_utf8_lossy(&run_output.stderr).to_string();
|
||||
let exit_status = run_output.status.code();
|
||||
write_manifest_if_requested_with_run_report(
|
||||
&invocation,
|
||||
run_output.status.success(),
|
||||
PrimaryOutput::Stdout {
|
||||
kind: Mode::Run.output_kind(),
|
||||
text: &stdout,
|
||||
},
|
||||
None,
|
||||
Some(BuildInfo {
|
||||
clang: &native.clang,
|
||||
runtime: &native.runtime,
|
||||
@ -907,8 +908,14 @@ fn run_native_from_llvm(
|
||||
}),
|
||||
&foreign_imports,
|
||||
project_artifact.as_ref(),
|
||||
RunReport {
|
||||
exit_status,
|
||||
stdout: &stdout,
|
||||
stderr: &stderr,
|
||||
args: &invocation.run_args,
|
||||
},
|
||||
);
|
||||
process::exit(run_output.status.code().unwrap_or(1));
|
||||
process::exit(exit_status.unwrap_or(1));
|
||||
}
|
||||
|
||||
struct NativeBuild {
|
||||
@ -1636,6 +1643,7 @@ fn exit_parse_error(err: ParseError, command_line: &str) -> ! {
|
||||
PrimaryOutput::Diagnostics { text: &stderr },
|
||||
None,
|
||||
None,
|
||||
None,
|
||||
&[],
|
||||
None,
|
||||
err.diagnostics,
|
||||
@ -1889,6 +1897,13 @@ struct TestSummary {
|
||||
filter: Option<String>,
|
||||
}
|
||||
|
||||
struct RunReport<'a> {
|
||||
exit_status: Option<i32>,
|
||||
stdout: &'a str,
|
||||
stderr: &'a str,
|
||||
args: &'a [String],
|
||||
}
|
||||
|
||||
fn test_summary_from_report(report: test_runner::TestReport) -> TestSummary {
|
||||
TestSummary {
|
||||
total_discovered: report.total_discovered,
|
||||
@ -1991,6 +2006,34 @@ fn write_manifest_if_requested_with_foreign_imports(
|
||||
success,
|
||||
primary_output,
|
||||
test_summary,
|
||||
None,
|
||||
build_info,
|
||||
foreign_imports,
|
||||
project_info,
|
||||
invocation.diagnostics,
|
||||
);
|
||||
write_manifest_or_exit(manifest_path, &manifest);
|
||||
}
|
||||
}
|
||||
|
||||
fn write_manifest_if_requested_with_run_report(
|
||||
invocation: &Invocation,
|
||||
success: bool,
|
||||
primary_output: PrimaryOutput<'_>,
|
||||
build_info: Option<BuildInfo<'_>>,
|
||||
foreign_imports: &[project::ProjectArtifactCImport],
|
||||
project_info: Option<&project::ProjectArtifact>,
|
||||
run_report: RunReport<'_>,
|
||||
) {
|
||||
if let Some(manifest_path) = invocation.manifest_path.as_deref() {
|
||||
let manifest = render_manifest(
|
||||
Some(&invocation.path),
|
||||
&invocation.command_line,
|
||||
Some(invocation.manifest_mode_name.as_str()),
|
||||
success,
|
||||
primary_output,
|
||||
None,
|
||||
Some(run_report),
|
||||
build_info,
|
||||
foreign_imports,
|
||||
project_info,
|
||||
@ -2014,6 +2057,7 @@ fn render_manifest(
|
||||
success: bool,
|
||||
primary_output: PrimaryOutput<'_>,
|
||||
test_summary: Option<TestSummary>,
|
||||
run_report: Option<RunReport<'_>>,
|
||||
build_info: Option<BuildInfo<'_>>,
|
||||
foreign_imports: &[project::ProjectArtifactCImport],
|
||||
project_info: Option<&project::ProjectArtifact>,
|
||||
@ -2115,6 +2159,34 @@ fn render_manifest(
|
||||
out.push_str(" )");
|
||||
}
|
||||
|
||||
if let Some(report) = run_report {
|
||||
out.push('\n');
|
||||
out.push_str(" (run-report\n");
|
||||
match report.exit_status {
|
||||
Some(status) => out.push_str(&format!(" (exit-status {})\n", status)),
|
||||
None => out.push_str(" (exit-status null)\n"),
|
||||
}
|
||||
out.push_str(&format!(
|
||||
" (stdout {})\n",
|
||||
diag::render_string(report.stdout)
|
||||
));
|
||||
out.push_str(&format!(
|
||||
" (stderr {})\n",
|
||||
diag::render_string(report.stderr)
|
||||
));
|
||||
out.push_str(" (args");
|
||||
if report.args.is_empty() {
|
||||
out.push_str(")\n");
|
||||
} else {
|
||||
out.push('\n');
|
||||
for arg in report.args {
|
||||
out.push_str(&format!(" (arg {})\n", diag::render_string(arg)));
|
||||
}
|
||||
out.push_str(" )\n");
|
||||
}
|
||||
out.push_str(" )");
|
||||
}
|
||||
|
||||
if let Some(build) = build_info {
|
||||
out.push('\n');
|
||||
out.push_str(" (hosted-build\n");
|
||||
|
||||
267
compiler/tests/run_manifest_beta22.rs
Normal file
267
compiler/tests/run_manifest_beta22.rs
Normal file
@ -0,0 +1,267 @@
|
||||
use std::{
|
||||
env, fs,
|
||||
path::{Path, PathBuf},
|
||||
process::{Command, Output},
|
||||
sync::atomic::{AtomicUsize, Ordering},
|
||||
};
|
||||
|
||||
static NEXT_FIXTURE_ID: AtomicUsize = AtomicUsize::new(0);
|
||||
|
||||
#[test]
|
||||
fn run_manifest_records_success_report_stdout_and_program_args() {
|
||||
let Some(clang) = find_clang() else {
|
||||
eprintln!("skipping run manifest success report: set GLAGOL_CLANG or install clang");
|
||||
return;
|
||||
};
|
||||
|
||||
let source = write_fixture(
|
||||
"success",
|
||||
r#"
|
||||
(module main)
|
||||
|
||||
(fn main () -> i32
|
||||
(print_string "beta22-out")
|
||||
0)
|
||||
"#,
|
||||
"slo",
|
||||
);
|
||||
let manifest_path = temp_path("success-manifest", "manifest.slo");
|
||||
|
||||
let mut command = Command::new(compiler_path());
|
||||
command
|
||||
.arg("run")
|
||||
.arg(&source)
|
||||
.arg("--manifest")
|
||||
.arg(&manifest_path)
|
||||
.arg("--")
|
||||
.arg("alpha")
|
||||
.arg("two words")
|
||||
.arg("--literal")
|
||||
.env("GLAGOL_CLANG", &clang);
|
||||
configure_clang_runtime_env(&mut command, &clang);
|
||||
|
||||
let output = command.output().expect("run glagol success manifest");
|
||||
assert_success_stdout("run manifest success", &output, "beta22-out\n");
|
||||
|
||||
let manifest = read_manifest(&manifest_path);
|
||||
assert!(
|
||||
manifest.contains(" (mode run)\n")
|
||||
&& manifest.contains(" (success true)\n")
|
||||
&& manifest.contains(" (run-report\n")
|
||||
&& manifest.contains(" (exit-status 0)\n")
|
||||
&& manifest.contains(" (stdout \"beta22-out\\n\")\n")
|
||||
&& manifest.contains(" (stderr \"\")\n")
|
||||
&& manifest.contains(" (arg \"alpha\")\n")
|
||||
&& manifest.contains(" (arg \"two words\")\n")
|
||||
&& manifest.contains(" (arg \"--literal\")\n"),
|
||||
"successful run manifest mismatch:\n{}",
|
||||
manifest
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn run_manifest_records_nonzero_report_and_preserves_program_stderr() {
|
||||
let Some(clang) = find_clang() else {
|
||||
eprintln!("skipping run manifest nonzero report: set GLAGOL_CLANG or install clang");
|
||||
return;
|
||||
};
|
||||
|
||||
let source = write_fixture(
|
||||
"nonzero",
|
||||
r#"
|
||||
(module main)
|
||||
|
||||
(import_c beta22_stderr () -> i32)
|
||||
|
||||
(fn emit_stderr () -> i32
|
||||
(unsafe
|
||||
(beta22_stderr)))
|
||||
|
||||
(fn main () -> i32
|
||||
(emit_stderr)
|
||||
7)
|
||||
"#,
|
||||
"slo",
|
||||
);
|
||||
let c_source = write_fixture(
|
||||
"nonzero-stderr",
|
||||
r#"
|
||||
#include <stdio.h>
|
||||
|
||||
int beta22_stderr(void) {
|
||||
fputs("beta22-err\n", stderr);
|
||||
return 0;
|
||||
}
|
||||
"#,
|
||||
"c",
|
||||
);
|
||||
let manifest_path = temp_path("nonzero-manifest", "manifest.slo");
|
||||
|
||||
let mut command = Command::new(compiler_path());
|
||||
command
|
||||
.arg("run")
|
||||
.arg(&source)
|
||||
.arg("--link-c")
|
||||
.arg(&c_source)
|
||||
.arg("--manifest")
|
||||
.arg(&manifest_path)
|
||||
.env("GLAGOL_CLANG", &clang);
|
||||
configure_clang_runtime_env(&mut command, &clang);
|
||||
|
||||
let output = command.output().expect("run glagol nonzero manifest");
|
||||
assert_exit_code("run manifest nonzero", &output, 7);
|
||||
assert_eq!(output.stdout, b"", "nonzero run stdout drifted");
|
||||
assert_eq!(output.stderr, b"beta22-err\n", "nonzero run stderr drifted");
|
||||
|
||||
let manifest = read_manifest(&manifest_path);
|
||||
assert!(
|
||||
manifest.contains(" (mode run)\n")
|
||||
&& manifest.contains(" (success false)\n")
|
||||
&& manifest.contains(" (run-report\n")
|
||||
&& manifest.contains(" (exit-status 7)\n")
|
||||
&& manifest.contains(" (stdout \"\")\n")
|
||||
&& manifest.contains(" (stderr \"beta22-err\\n\")\n")
|
||||
&& manifest.contains(" (args)\n"),
|
||||
"nonzero run manifest mismatch:\n{}",
|
||||
manifest
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn run_manifest_source_failure_does_not_record_fake_run_report() {
|
||||
let source = write_fixture(
|
||||
"source-failure",
|
||||
r#"
|
||||
(module main)
|
||||
|
||||
(fn main () -> i32
|
||||
true)
|
||||
"#,
|
||||
"slo",
|
||||
);
|
||||
let manifest_path = temp_path("source-failure-manifest", "manifest.slo");
|
||||
|
||||
let output = run_glagol([
|
||||
"run".as_ref(),
|
||||
source.as_os_str(),
|
||||
"--manifest".as_ref(),
|
||||
manifest_path.as_os_str(),
|
||||
]);
|
||||
assert_exit_code("run manifest source failure", &output, 1);
|
||||
|
||||
let manifest = read_manifest(&manifest_path);
|
||||
assert!(
|
||||
manifest.contains(" (mode run)\n")
|
||||
&& manifest.contains(" (success false)\n")
|
||||
&& manifest.contains(" (kind diagnostics)\n")
|
||||
&& manifest.contains("TypeMismatch")
|
||||
&& !manifest.contains(" (run-report\n"),
|
||||
"source failure manifest included fake run report:\n{}",
|
||||
manifest
|
||||
);
|
||||
}
|
||||
|
||||
fn run_glagol<const N: usize>(args: [&std::ffi::OsStr; N]) -> Output {
|
||||
Command::new(compiler_path())
|
||||
.args(args)
|
||||
.output()
|
||||
.expect("run glagol")
|
||||
}
|
||||
|
||||
fn compiler_path() -> &'static str {
|
||||
env!("CARGO_BIN_EXE_glagol")
|
||||
}
|
||||
|
||||
fn write_fixture(name: &str, source: &str, extension: &str) -> PathBuf {
|
||||
let path = temp_path(name, extension);
|
||||
fs::write(&path, source).unwrap_or_else(|err| panic!("write `{}`: {}", path.display(), err));
|
||||
path
|
||||
}
|
||||
|
||||
fn temp_path(name: &str, extension: &str) -> PathBuf {
|
||||
let id = NEXT_FIXTURE_ID.fetch_add(1, Ordering::Relaxed);
|
||||
let mut path = env::temp_dir();
|
||||
path.push(format!(
|
||||
"glagol-run-manifest-beta22-{}-{}-{}.{}",
|
||||
std::process::id(),
|
||||
id,
|
||||
name,
|
||||
extension
|
||||
));
|
||||
path
|
||||
}
|
||||
|
||||
fn read_manifest(path: &Path) -> String {
|
||||
fs::read_to_string(path).unwrap_or_else(|err| panic!("read `{}`: {}", path.display(), err))
|
||||
}
|
||||
|
||||
fn assert_success_stdout(context: &str, output: &Output, expected: &str) {
|
||||
assert!(
|
||||
output.status.success(),
|
||||
"{} failed\nstdout:\n{}\nstderr:\n{}",
|
||||
context,
|
||||
String::from_utf8_lossy(&output.stdout),
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
assert_eq!(
|
||||
String::from_utf8_lossy(&output.stdout),
|
||||
expected,
|
||||
"{} stdout mismatch",
|
||||
context
|
||||
);
|
||||
assert!(
|
||||
output.stderr.is_empty(),
|
||||
"{} wrote stderr:\n{}",
|
||||
context,
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
}
|
||||
|
||||
fn assert_exit_code(context: &str, output: &Output, expected: i32) {
|
||||
assert_eq!(
|
||||
output.status.code(),
|
||||
Some(expected),
|
||||
"{} exit code mismatch\nstdout:\n{}\nstderr:\n{}",
|
||||
context,
|
||||
String::from_utf8_lossy(&output.stdout),
|
||||
String::from_utf8_lossy(&output.stderr)
|
||||
);
|
||||
}
|
||||
|
||||
fn find_clang() -> Option<PathBuf> {
|
||||
if let Some(path) = env::var_os("GLAGOL_CLANG").filter(|value| !value.is_empty()) {
|
||||
let path = PathBuf::from(path);
|
||||
if path.is_file() {
|
||||
return Some(path);
|
||||
}
|
||||
}
|
||||
|
||||
let hermetic_clang = PathBuf::from("/tmp/glagol-clang-root/usr/bin/clang");
|
||||
if hermetic_clang.is_file() {
|
||||
return Some(hermetic_clang);
|
||||
}
|
||||
|
||||
find_on_path("clang")
|
||||
}
|
||||
|
||||
fn find_on_path(name: &str) -> Option<PathBuf> {
|
||||
let path = env::var_os("PATH")?;
|
||||
env::split_paths(&path)
|
||||
.map(|dir| dir.join(name))
|
||||
.find(|candidate| candidate.is_file())
|
||||
}
|
||||
|
||||
fn configure_clang_runtime_env(command: &mut Command, clang: &Path) {
|
||||
if !clang.starts_with("/tmp/glagol-clang-root") {
|
||||
return;
|
||||
}
|
||||
|
||||
let root = Path::new("/tmp/glagol-clang-root");
|
||||
let lib64 = root.join("usr/lib64");
|
||||
let lib = root.join("usr/lib");
|
||||
let existing = env::var_os("LD_LIBRARY_PATH").unwrap_or_default();
|
||||
let mut paths = vec![lib64, lib];
|
||||
paths.extend(env::split_paths(&existing));
|
||||
let joined = env::join_paths(paths).expect("join LD_LIBRARY_PATH");
|
||||
command.env("LD_LIBRARY_PATH", joined);
|
||||
}
|
||||
@ -12,6 +12,36 @@ integration/readiness release, not the first real beta.
|
||||
|
||||
No active unreleased compiler scope is documented here yet.
|
||||
|
||||
## 1.0.0-beta.22
|
||||
|
||||
Release label: `1.0.0-beta.22`
|
||||
|
||||
Release date: 2026-05-23
|
||||
|
||||
Release state: run manifest and execution report hardening
|
||||
|
||||
### Summary
|
||||
|
||||
The beta.22 compiler/tooling slice hardens `glagol run --manifest` evidence
|
||||
without changing the Slovo language or standard-library surface:
|
||||
|
||||
- Bump the `glagol` compiler package version to `1.0.0-beta.22`.
|
||||
- Add an additive run-report block to run-mode artifact manifests.
|
||||
- Record executed-program exit status, captured stdout, captured stderr, and
|
||||
forwarded program arguments.
|
||||
- Keep the run report as beta tooling metadata under the existing
|
||||
`slovo.artifact-manifest` version `1` contract rather than a stable schema
|
||||
freeze.
|
||||
- Keep non-run modes outside this run-report requirement.
|
||||
|
||||
### Explicit Deferrals
|
||||
|
||||
This release does not implement source-language syntax, standard-library
|
||||
helpers, compiler-known `std.*` runtime names, runtime C capabilities, package
|
||||
or workspace behavior, stable artifact-manifest schema guarantees, stable
|
||||
Markdown schemas, LSP/watch/SARIF/daemon protocols, performance claims,
|
||||
stable ABI/layout, or a stable standard-library compatibility contract.
|
||||
|
||||
## 1.0.0-beta.21
|
||||
|
||||
Release label: `1.0.0-beta.21`
|
||||
|
||||
@ -21,8 +21,8 @@ general-purpose beta release.
|
||||
|
||||
A Glagol feature is done only when it has parser/lowerer support, checker behavior, diagnostics for invalid forms, backend behavior or explicit unsupported diagnostics, and tests.
|
||||
|
||||
Current stage: `1.0.0-beta.21`, released on 2026-05-23 as a JSON document
|
||||
scalar parsing foundation. It keeps the
|
||||
Current stage: `1.0.0-beta.22`, released on 2026-05-23 as run manifest and
|
||||
execution report hardening. It keeps the
|
||||
`1.0.0-beta` language/compiler support baseline and includes the
|
||||
`1.0.0-beta.1` tooling hardening release, the `1.0.0-beta.2` runtime/resource
|
||||
foundation release, the `1.0.0-beta.3` standard-library stabilization release,
|
||||
@ -115,6 +115,14 @@ JSON token parser family and existing source-level composition, and verifies
|
||||
that direct compiler-known runtime calls and private `__glagol_json_*document*`
|
||||
symbols for the new helper names remain unsupported.
|
||||
|
||||
The beta.22 compiler/tooling slice bumps the package version and hardens
|
||||
`glagol run --manifest` evidence with an additive run-report block in
|
||||
run-mode artifact manifests. The block records executed-program exit status,
|
||||
captured stdout, captured stderr, and forwarded program arguments. It is beta
|
||||
CLI evidence metadata under the existing `slovo.artifact-manifest` version
|
||||
`1` contract, not a stable schema freeze, and it adds no source-language,
|
||||
runtime, package, or standard-library surface.
|
||||
|
||||
Generic vectors, generic collections, maps, sets, generic stdlib dispatch,
|
||||
runtime collection changes, collection unification, stable human diagnostic
|
||||
text, stable artifact-manifest or Markdown schema freezes, LSP/watch
|
||||
|
||||
@ -8,7 +8,7 @@ Historical `exp-*` releases listed here are experimental maturity milestones.
|
||||
The pushed tag `v2.0.0-beta.1` is historical. It is now documented as an
|
||||
experimental integration/readiness release, not as a beta maturity claim.
|
||||
|
||||
The current release is `1.0.0-beta.21`, published on 2026-05-23. It keeps the
|
||||
The current release is `1.0.0-beta.22`, published on 2026-05-23. It keeps the
|
||||
`1.0.0-beta` language surface, includes the first post-beta tooling/install
|
||||
hardening bundle from `1.0.0-beta.1`, and adds the first runtime/resource
|
||||
foundation bundle from `1.0.0-beta.2` plus the first standard-library
|
||||
@ -31,12 +31,36 @@ parsing foundation from `1.0.0-beta.17`, plus the JSON string token parsing
|
||||
foundation from `1.0.0-beta.18`, the test discovery and user-project
|
||||
conformance foundation from `1.0.0-beta.19`, and the string search and ASCII
|
||||
trim foundation from `1.0.0-beta.20`, plus the JSON document scalar parsing
|
||||
foundation from `1.0.0-beta.21`.
|
||||
foundation from `1.0.0-beta.21`, and the run manifest execution-report
|
||||
hardening slice from `1.0.0-beta.22`.
|
||||
|
||||
## Unreleased
|
||||
|
||||
No active unreleased language scope is documented here yet.
|
||||
|
||||
## 1.0.0-beta.22
|
||||
|
||||
Release label: `1.0.0-beta.22`
|
||||
|
||||
Release name: Run Manifest And Execution Report Hardening
|
||||
|
||||
Release date: 2026-05-23
|
||||
|
||||
Status: released beta tooling/CLI evidence hardening on the `1.0.0-beta`
|
||||
language baseline.
|
||||
|
||||
This release does not change the Slovo language or standard-library surface.
|
||||
It documents the matching Glagol tooling update: `glagol run --manifest`
|
||||
artifact manifests now include an additive run-report block for the executed
|
||||
program's exit status, captured stdout, captured stderr, and forwarded program
|
||||
arguments.
|
||||
|
||||
The run-report block is beta tooling metadata under the existing
|
||||
`slovo.artifact-manifest` version `1` contract. It is not a stable manifest
|
||||
schema freeze and does not add source-language syntax, stdlib helpers,
|
||||
compiler-known runtime names, runtime C capabilities, package/import behavior,
|
||||
stable ABI/layout guarantees, or stable stdlib/API compatibility.
|
||||
|
||||
## 1.0.0-beta.21
|
||||
|
||||
Release label: `1.0.0-beta.21`
|
||||
|
||||
@ -8,8 +8,8 @@ Guiding rule: the manifest wins. A feature is not accepted until it has surface
|
||||
Long-horizon planning lives in `.llm/ROADMAP_TO_STABLE.md`. It defines the
|
||||
release train beyond the first real general-purpose beta Slovo contract.
|
||||
|
||||
Current stage: `1.0.0-beta.21`, released on 2026-05-23 as a post-beta JSON
|
||||
document scalar parsing foundation. It keeps the
|
||||
Current stage: `1.0.0-beta.22`, released on 2026-05-23 as post-beta run
|
||||
manifest and execution-report hardening. It keeps the
|
||||
`1.0.0-beta` language
|
||||
contract and includes the `1.0.0-beta.1` tooling hardening release, the
|
||||
`1.0.0-beta.2` runtime/resource foundation release, the `1.0.0-beta.3`
|
||||
@ -27,7 +27,8 @@ string scanning and token boundary helpers, `1.0.0-beta.17` JSON primitive
|
||||
scalar token parsing, `1.0.0-beta.18` JSON string token parsing,
|
||||
`1.0.0-beta.19` test discovery and user-project conformance tooling, and
|
||||
`1.0.0-beta.20` string search and ASCII trim helpers, plus
|
||||
`1.0.0-beta.21` JSON document scalar parsing helpers.
|
||||
`1.0.0-beta.21` JSON document scalar parsing helpers, and
|
||||
`1.0.0-beta.22` run manifest execution-report hardening.
|
||||
|
||||
`1.0.0-beta.16` adds `std.string` source facades and examples for
|
||||
`byte_at_result`, `slice_result`, `starts_with`, and `ends_with`. These helpers
|
||||
@ -95,6 +96,15 @@ streaming, new compiler-known runtime names, Unicode escape decoding beyond
|
||||
the existing string-token helper, embedded NUL policy, stable ABI/layout, and
|
||||
stable stdlib/API freeze deferred.
|
||||
|
||||
`1.0.0-beta.22` is tooling/CLI evidence hardening, not a language feature. It
|
||||
documents the matching Glagol `run --manifest` update: run-mode artifact
|
||||
manifests gain an additive run-report block for executed-program exit status,
|
||||
captured stdout, captured stderr, and forwarded program arguments. The block is
|
||||
beta tooling metadata under the existing `slovo.artifact-manifest` version `1`
|
||||
contract. It is not a stable schema freeze and adds no language syntax,
|
||||
standard-library helpers, runtime capabilities, package/import behavior,
|
||||
stable ABI/layout, or stable stdlib/API guarantees.
|
||||
|
||||
The final experimental precursor scope is `exp-125`, defined in
|
||||
`.llm/EXP_125_UNSIGNED_U32_U64_NUMERIC_AND_STDLIB_BREADTH_ALPHA.md`. Its
|
||||
unsigned direct-value flow, parse/format runtime lanes, and matching staged
|
||||
|
||||
@ -12,7 +12,8 @@ and token boundary foundation, `1.0.0-beta.17` JSON primitive scalar parsing
|
||||
foundation, `1.0.0-beta.18` JSON string token parsing foundation,
|
||||
`1.0.0-beta.19` test discovery and user-project conformance tooling, and
|
||||
`1.0.0-beta.20` string search and ASCII trim foundation, and
|
||||
`1.0.0-beta.21` JSON document scalar parsing foundation. The
|
||||
`1.0.0-beta.21` JSON document scalar parsing foundation, and
|
||||
`1.0.0-beta.22` run manifest and execution-report hardening. The
|
||||
language contract
|
||||
integrates
|
||||
promoted language slices through `exp-125` and the historical publication
|
||||
@ -256,6 +257,14 @@ Current v1 release surface and explicit experimental targets:
|
||||
parser/tokenizer objects, maps/sets, streaming, Unicode escape decoding
|
||||
beyond the existing string-token behavior, embedded NUL policy,
|
||||
ABI/layout guarantees, performance claims, or stable stdlib/API freeze
|
||||
- `1.0.0-beta.22` run manifest and execution-report hardening:
|
||||
`glagol run --manifest` artifact manifests include an additive run-report
|
||||
block after a supported program executes. The block records the executed
|
||||
program exit status, captured stdout, captured stderr, and forwarded
|
||||
program arguments. This target is beta tooling evidence only; it does not
|
||||
add source-language syntax, stdlib helpers, compiler-known runtime names,
|
||||
runtime C capabilities, package/import behavior, stable artifact-manifest
|
||||
schema guarantees, stable ABI/layout, or stable stdlib/API freeze
|
||||
- `exp-1` owned runtime strings: compiler-known `std.string.concat` accepts two
|
||||
`string` values and returns an immutable runtime-owned `string`; existing
|
||||
string equality, length, printing, locals, parameters, returns, and calls work
|
||||
|
||||
@ -6,7 +6,7 @@ Do not edit this file by hand.
|
||||
## Stability Tiers
|
||||
|
||||
- `beta-supported`: exported from `lib/std` and covered by source-search, promotion, or facade gates in the current beta line.
|
||||
- `experimental`: not used for exported `lib/std` helpers in `1.0.0-beta.21`; future releases may mark new helpers this way before they graduate.
|
||||
- `experimental`: not used for exported `lib/std` helpers in `1.0.0-beta.22`; future releases may mark new helpers this way before they graduate.
|
||||
- `internal`: helper names that are not exported from their module; they are intentionally omitted from this catalog.
|
||||
|
||||
The catalog is a beta API discovery aid, not a stable `1.0.0` standard-library freeze.
|
||||
|
||||
@ -72,6 +72,7 @@ cargo test --test standard_json_string_parsing_beta18
|
||||
cargo test --test test_discovery_beta19
|
||||
cargo test --test standard_string_search_trim_beta20
|
||||
cargo test --test standard_json_document_scalar_parsing_beta21
|
||||
cargo test --test run_manifest_beta22
|
||||
# Full cargo test includes unignored integration gates such as dx_v1_7,
|
||||
# beta_v2_0_0_beta_1, and beta_1_0_0.
|
||||
cargo test
|
||||
|
||||
Loading…
Reference in New Issue
Block a user