Skip to content

Add Firmament V2 Phase 1 validation report and aetheris validate CLI#803

Merged
yuechen-li-dev merged 1 commit into
masterfrom
codex/add-validation/report-integration-layer
Jun 24, 2026
Merged

Add Firmament V2 Phase 1 validation report and aetheris validate CLI#803
yuechen-li-dev merged 1 commit into
masterfrom
codex/add-validation/report-integration-layer

Conversation

@yuechen-li-dev

Copy link
Copy Markdown
Owner

Motivation

  • Make the existing Firmament V2 bound model (lets, let-record fields, arithmetic-nominals, tolerances, Forge concept applications, and record-shaped PMI) visible and auditable without adding new authoring syntax or AP242 lowering.
  • Provide a deterministic, LLM-/human-friendly validation/report model so export-deferred PMI and tolerance-drop warnings are explicit and not silently ignored.
  • Expose the report through the existing CLI surface so fixtures and tooling can consume firmamentV2Validation JSON.

Description

  • Add a new report model and builder in Aetheris.Kernel.Firmament/FirmamentV2/FirmamentV2ValidationReport.cs that produces FirmamentV2ValidationReport with source, status, lets, concepts, pmi, exportSupport, diagnostics, and summary, and includes the Phase‑1 export matrix and deterministic status semantics (invalid, valid-with-deferred-export, valid).
  • Preserve parser visibility for partially bound documents: introduce IsFatalDiagnosticCode (public) and change parse result wiring so the parse can preserve a Document while marking parse success/fatality; the report builder classifies diagnostics into fatal/warning and includes tolerance-drop warnings.
  • Add a validate command to the CLI in Aetheris.CLI/CliRunner.cs exposing dotnet run --project Aetheris.CLI -- validate <file.firmament|file.firmfixture> [--json] which emits JSON rooted at firmamentV2Validation when --json is used.
  • Add fixtures exercising valid-with-deferred-export, exportable-only, missing PMI tolerance, Forge missing-field, and unknown-datum cases under fixtures/FirmamentV2/Language/*, add unit tests Aetheris.Kernel.Firmament.Tests/FirmamentV2ValidationReportTests.cs, and add documentation docs/implementation/v2-phase1-r1-validation-report.md and scope-contract updates.

Testing

  • Ran dotnet restore and dotnet build Aetheris.slnx -f net10.0 --no-restore /m:1, which completed successfully (build warnings only).
  • Ran unit tests via dotnet test Aetheris.Kernel.Firmament.Tests/Aetheris.Kernel.Firmament.Tests.csproj with filters for validation/report/PMI-related tests; tests passed (targeted suite and new ValidationReport tests succeeded).
  • Ran the new CLI validation invocation dotnet run --project Aetheris.CLI -- validate fixtures/FirmamentV2/Language/valid/v2-phase1-validation-report.valid.firmfixture --json and verified output contains firmamentV2Validation JSON with expected status (valid-with-deferred-export) and counts.
  • Performed git diff --check and repository build/test validations described above as part of the change verification.

Codex Task

@yuechen-li-dev yuechen-li-dev merged commit 91a581a into master Jun 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant