Skip to content

feat(rules_score): trace failure modes to public API methods - #555

Merged
LittleHuba merged 1 commit into
mainfrom
joho_implement_api
Oct 29, 2026
Merged

LittleHuba merged 1 commit into
mainfrom
joho_implement_api

Conversation

@hoe-jo

@hoe-jo hoe-jo commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

FailureMode.interface was a free-text String. It is now a list of ApiMethod TRLC records generated from the public_api class diagrams, so failure modes trace to concrete interface methods.

puml_cli / puml_api

  • New puml_api crate replaces puml_lobster. It collects the public methods of the resolved class model: one record per method name (all overloads) and one per free function. Attributes, enums, typedefs and non-public members yield no record.
  • New --api-output-file / --api-package flags write public_api.trlc. Public API inputs must be class diagrams.
  • Operators and destructors get stable record names. Unsupported operators (conversion, new, delete, co_await) fail with UnsupportedOperator.
  • Split main.rs into inputs, parsing, resolving, fta and sinks modules.
  • Shared TRLC rendering moves to puml_utils::trlc. FTA package names that start with a digit now get a P prefix.

rules_score

  • Add the ScoreReq.ApiMethod record type.
  • FailureMode.guidewords is a list. The safety-analysis page shows one badge per guideword.
  • architectural_design takes package. It is required with public_api diagrams and rejected without them.
  • failure_modes lists the architectural_design in deps to resolve the records.
  • lobster_sa: the "Architecture" level is replaced by "Public API".
  • Remove trlc_package.bzl. The default FTA package is inlined into safety_analysis.bzl.
  • Update examples, tests and user docs.

BREAKING CHANGE: FailureMode.interface now references ApiMethod records generated from public_api class diagrams. Migrate by:

  • adding package to architectural_design targets with public_api
  • adding that target to the deps of failure_modes
  • removing arch_design from safety_analysis
  • replacing string interface values with ApiMethod references The "Architecture" lobster level is renamed "Public API"; public_api accepts class diagrams only; puml_cli --lobster-output-dir is removed.

FailureMode.interface was a free-text String. It is now a list of
ApiMethod TRLC records generated from the public_api class diagrams,
so failure modes trace to concrete interface methods.

puml_cli / puml_api
- New puml_api crate replaces puml_lobster. It collects the public
  methods of the resolved class model: one record per method name (all
  overloads) and one per free function. Attributes, enums, typedefs and
  non-public members yield no record.
- New --api-output-file / --api-package flags write public_api.trlc.
  Public API inputs must be class diagrams.
- Operators and destructors get stable record names. Unsupported
  operators (conversion, new, delete, co_await) fail with
  UnsupportedOperator.
- Split main.rs into inputs, parsing, resolving, fta and sinks modules.
- Shared TRLC rendering moves to puml_utils::trlc. FTA package names
  that start with a digit now get a `P` prefix.

rules_score
- Add the ScoreReq.ApiMethod record type.
- FailureMode.guidewords is a list. The safety-analysis page shows one
  badge per guideword.
- architectural_design takes `package`. It is required with
  public_api diagrams and rejected without them.
- failure_modes lists the architectural_design in `deps` to resolve the
  records.
- lobster_sa: the "Architecture" level is replaced by "Public API".
- Remove trlc_package.bzl. The default FTA package is inlined into
  safety_analysis.bzl.
- Update examples, tests and user docs.

BREAKING CHANGE: FailureMode.interface now references ApiMethod records
generated from public_api class diagrams. Migrate by:
- adding `package` to architectural_design targets with public_api
- adding that target to the `deps` of failure_modes
- removing `arch_design` from safety_analysis
- replacing string `interface` values with ApiMethod references
The "Architecture" lobster level is renamed "Public API"; public_api
accepts class diagrams only; puml_cli --lobster-output-dir is removed.
@github-actions

Copy link
Copy Markdown

Coverage Report

Coverage report was generated.

Full report can be downloaded from the CI artifacts (expand Artifacts at the bottom of the run).

Overall coverage rate:

lines......: 90.1%
functions......: 60.3%

@LittleHuba
LittleHuba added this pull request to the merge queue Oct 29, 2026
Merged via the queue into main with commit 266ab46 Oct 29, 2026
17 checks passed
@LittleHuba
LittleHuba deleted the joho_implement_api branch October 29, 2026 14:34
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