Skip to content

feat(oeb): parse cvc.oeb.report into structured CheckResult.report#109

Merged
jeffdi merged 2 commits intomainfrom
feature/oeb-report-structured
Apr 24, 2026
Merged

feat(oeb): parse cvc.oeb.report into structured CheckResult.report#109
jeffdi merged 2 commits intomainfrom
feature/oeb-report-structured

Conversation

@jeffdi
Copy link
Copy Markdown
Contributor

@jeffdi jeffdi commented Apr 24, 2026

Summary

Structures the OEB check output so the chipIgnite platform can render a rich per-GPIO report instead of just a pass/fail string. Verified on dev.

1. Structured OEB report (1.3.0, `162ec1b`)

  • New `_oeb_report.py` parser that reads `cvc.oeb.report` and emits a structured dict:
    • `design_type` (caravel / caravan / openframe)
    • `gpios[]` with per-pin data: GPIO, user_index, analog_index, in/out/analog counts, oeb_min/sim/max, configuration / resolved_mode, error_count, warning_count
    • `messages[]` with `{gpio, severity, text}` entries
    • `summary` totals
    • `parse_error` on malformed inputs (never raises).
  • Handles both caravel/caravan and openframe formats; tolerant to variations.
  • Widens `CheckResult` with a `report` field sibling to `details` (backward compatible — existing consumers that read `details` keep working).
  • `Oeb.run()` now attaches the structured report alongside a one-line `details` summary.
  • Comprehensive unit tests in `tests/checks/test_oeb_report.py` for both formats, error/warning detection, and malformed input.

2. Benign LVS warning filter (1.3.1, `7d1df94`)

  • "Missing LVS configuration variable ..." warnings are logged but no longer surfaced as the FAIL summary detail — they masked the real failure reason in the CLI output.
  • Extracted the filter to a standalone `_warning_filters.py` so it's importable in test environments without KLayout/pya.
  • Covered by `tests/test_runner_warnings.py`.

Test plan

  • Unit tests pass: `pytest tests/` (with `pyproject.toml` setting `pythonpath = ["src"]`).
  • Dev end-to-end: local Docker run of `cf-precheck -c oeb` on chipignite-demo-dev-2 produced a populated `project.json` with the expected structured `precheck.checks.oeb.report`; `cf push` callback landed in backend; UI card rendered correctly.
  • FAIL case with missing LVS vars: fail summary now shows the real error, not the benign warning.

Made with Cursor

….3.0)

Adds cf_precheck.checks._oeb_report with dual parsers for caravel/caravan and
openframe report layouts. Oeb.run() now locates the emitted report, parses it
with a design-type hint, and attaches a structured dict plus a one-line summary
to the CheckResult so the platform UI can render per-GPIO rows, ERR/WARN badges,
and messages without re-parsing. Runner picks up check.report / check.details
via getattr so other checks can opt into the same pattern later. Report is
always optional: parse failures surface as {parse_error: ...} and never change
the OEB check's pass/fail status.

Includes 15 unit tests covering caravel, caravan hint, openframe dm resolution,
no-issues path, CRLF tolerance, empty file, and missing-report fallback, plus
pytest config pointing at src/ so `pytest` runs out of the box.

Made-with: Cursor
… (1.3.1)

The runner captures every WARNING+ log emitted during a check and uses the
first one as the one-line FAIL summary when the check itself hasn't set
`details`. "Missing LVS configuration variable EXTRACT_CREATE_SUBCUT" (and
the eight sibling messages from config.start_be_check) fire on almost every
project whose lvs_config.*.json omits the optional LVS optimisation keys,
and they fire before run_oeb_check / run_be_checks starts — so they always
win the first-captured-warning race and mask the real failure reason.

Filter them out of `fallback_detail` (and the dim trailing hint line) via a
small substring allow-list. Messages still go to the log at WARNING level
so a curious user can still see them. Factored the classifier into
_warning_filters.py so tests can import it without dragging in pya/KLayout
through check_manager.

Includes 3 unit tests covering the benign-match, real-error, and
no-regex-in-substring-list invariants.

Made-with: Cursor
@jeffdi jeffdi merged commit f2d9445 into main Apr 24, 2026
7 of 8 checks passed
@jeffdi jeffdi deleted the feature/oeb-report-structured branch April 24, 2026 00:21
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.

2 participants