Repository navigation
fix(export): enforce the writer I/O contract and finish review follow-ups - #60
Merged
Merged
Conversation
…ow-ups - enforce the writer I/O contract via common/checked_output.h: open, write, flush and close failures now return false before any success log - move metrics JSON back to the metrics library and WCET JSON into src/export - decouple src/export from the parse layer by localizing the TDG DOT label helpers; ptpn_export no longer links ptpn_json or ptpn_metrics - move the spdlog-backed logging helpers out of app/common.h into app/logging.h and make app_support's spdlog dependency PRIVATE - slim model/petri.h by moving both to_string bodies into petri.cpp - index scheduling policy internals under state_class::detail and include firing_rule.h from the reachability headers - replace the direct app_check link check with a recursive closure guard - fix architecture/CLAUDE docs to match the current layers Co-Authored-By: Claude Code <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up fixes from a full
/code-reviewpass over the post-#59 tree.Correctness
common/checked_output.h(ptpn::finish_output) and use it in every output writer: TDG DOT, TDG JSON, PTPN DOT, SCG DOT, WCET JSON, metrics JSON. Delayed write/close errors (full disk, quota) now return failure and surface asE-INT-002instead of a success log./dev/fullintegration test to cover TDG JSON (RTSL path), metrics JSON, PTPN DOT, and SCG DOT (previously only TDG DOT and WCET JSON).Layering / build coupling
src/analysis/metrics/; WCET JSON writer moved fromsrc/appintosrc/export/.ptpn_exportno longer linksptpn_metricsorptpn_json; TDG DOT label helpers are localized insrc/export/tdg_dot.cpp.src/app/common.hno longer includes spdlog; the[STATS]/scoped-level helpers live insrc/app/logging.h, andptpn_app_support's spdlog dependency is PRIVATE.scheduling/firing_rule.hinstead of the umbrella policy header.model/petri.hdrops<iostream>/<sstream>; bothto_string()bodies moved topetri.cpp.state_class::detail; the CMake check-isolation guard walks the transitiveINTERFACE_LINK_LIBRARIESclosure (unwrapping$<LINK_ONLY:...>).<fstream>inmodel/tdg.cpp, stale policy_common includes).Docs
docs/architecture.mdandCLAUDE.mdcorrected: no model↔parse include cycle, writer ownership, logging split.Verification
cmake --build build --parallelctest --test-dir build --output-on-failure: 325/325 passed/dev/fullchecks for all writers: exit 1 +E-INT-002with subjectoutput:/dev/full🤖 Generated with Claude Code