Skip to content

M3: scene format version 1 and luxpath check - #3

Merged
Erry91 merged 1 commit into
mainfrom
feat/m3-scene
Oct 21, 2026
Merged

Erry91 merged 1 commit into
mainfrom
feat/m3-scene

Conversation

@Erry91

@Erry91 Erry91 commented Oct 21, 2026

Copy link
Copy Markdown
Owner

What this changes

M3: scenes and luxpath check.

  • Scene format version 1 (docs/scene-format.md), in TOML:
    • photometric files with their emergency output;
    • luminaires (position, heading, tilt);
    • escape routes (centre line and width);
    • open and high-risk areas (polygons);
    • points of emphasis (eight kinds, with an optional facing surface for vertical illuminance);
    • calculation settings.
  • Located errors: unknown fields are errors, and every error names its line and column. The maintenance factor and emergency outputs have no defaults.
  • luxpath check scene.toml prints min/mean/max and max/min per route, area and point, followed by the assumptions and the disclaimer.
    • Exit codes: 0 pass, 1 fail, 2 input error, 3 cannot verify.
    • Until M4 checks EN 1838 requirements, the verdict is always "cannot verify" (3).
    • A luminaire without a declared emergency output makes every result "cannot verify" with the reason, never a number.
  • Three example scenes in examples/: an L-shaped corridor, an open-plan office, and a plant room with a high-risk area and wall-mounted luminaires. Their synthetic photometry is generated from formulas listed in examples/photometry/README.md.
  • Crate placement: luxpath-rules evaluates a scene; luxpath-report writes the text report.

How you verified it

  • cargo xtask ci, natively (macOS) and in the local Linux container. Merged on the local checks (hosted CI unavailable).
  • Exit criteria:
    • three example scenes run end to end (apps/luxpath-cli/tests/check.rs);
    • 17 malformed scenes give the expected line and column (crates/scene/src/tests.rs).
  • Watched the tests fail:
    • allowing unknown fields turns the scene test red;
    • defaulting a missing emergency output turns the rules and CLI tests red.
  • Hand check: Exit A in the corridor example.
    • The bulkhead L5 overhead gives about 1.46 lx.
    • The corridor luminaire L4, 6 m away along its C0, gives about 0.18 lx.
    • With L3's small share, that matches the reported 1.66 lx.

Life safety (AGENTS.md §2)

  • No path reports "pass": no requirement is checked yet, and missing data gives "cannot verify"
  • Assumptions are printed with every result: direct light only, no obstruction, maintenance factor, emergency flux, grid settings

Never panic (AGENTS.md §3)

  • Scenes over 4 MB are refused; non-finite numbers and zero vectors are errors; hostile TOML is tested

Provenance (AGENTS.md §1)

  • No standard values encoded. Grid defaults are luxpath's own, labelled as such.
  • Only synthetic photometry committed

Records

  • parity/features.toml: the scene features shipped, cli.check partial
  • docs/status.md, docs/gaps.md (row 5 closed), docs/roadmap.md, ROADMAP.md log, README status

TOML scenes (docs/scene-format.md) with photometry and emergency output,
luminaires, escape routes, open and high-risk areas, points of emphasis;
unknown fields refused, errors located by line and column. `luxpath
check` reports illuminance per element with its assumptions and exits
0/1/2/3 (pass, fail, input error, cannot verify; always 3 until M4).
Three example scenes with synthetic photometry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Erry91
Erry91 merged commit f00810a into main Oct 21, 2026
@Erry91
Erry91 deleted the feat/m3-scene branch October 21, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant