Skip to content

feat(check): add the NASA-HDBK-1009A library, its checks and a demo - #2573

Open
HuiJun wants to merge 22 commits into
developfrom
feat/hdbk1009-library
Open

HuiJun wants to merge 22 commits into
developfrom
feat/hdbk1009-library

Conversation

@HuiJun

@HuiJun HuiJun commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

Adds NASA-HDBK-1009A (NASA Systems Modeling Handbook for Systems Engineering) support, built the way the NPR 7123.1D library was (#1928). The Handbook is NASA's guide to carrying out NPR 7123.1 in a SysML model; this brings its vocabulary, work products and traceability rules to OpenSysML as a non-normative extension library.

  • Library. Pins the Extensions Library at 2a2cd27 (feat: add the NASA-HDBK-1009A library OpenSysML-Extensions-Library#24) and vendors HDBK1009.sysml: the requirements, behavior, structure, parametric and V&V vocabulary, the generated registers, product documents, matrices and views. The Handbook's SysML v1.7 relationships map onto native SysML v2 ones (derivation, refinement, dependency, satisfy, verify, allocate); no new relationship kind is introduced.
  • Checks. HDBK1009Pass reports seven warnings, all catalogued in docs/reference/diagnostics.md: hdbk1009-requirement-not-derived, hdbk1009-expectation-not-traced, hdbk1009-measure-not-refining, hdbk1009-requirement-not-verified, hdbk1009-vv-requirement-not-refined, hdbk1009-vv-requirement-missing-method, hdbk1009-objective-not-validated.
  • Cross-document facts. Interface records now carry dependencies, refinements and verifications, so the checks hold across documents; interfaceFormatVersion moves to 27.
  • Document queries. DocumentQueries::RelatedColumn accepts the relationship kind "dependency", which the trace columns need.
  • Demo and docs. examples/hdbk1009-demo/, docs/project/hdbk1009-library.md, a compliance source, and a changelog fragment.

The pin is deliberately 2a2cd27, an ancestor of Extensions Library main that holds the libraries develop already binds plus HDBK1009. The tip of main also carries NPR7150 and NASASTD7009, whose engine-contract names develop does not derive until #2545 and #2542 land, so pinning it would fail TestEngineContract. This PR therefore does not stack behind either; whichever lands later moves the pin forward.

Do not queue yet: this ships in 0.13.1 and stays out of the merge queue until Release Management confirms the 0.13.0 cut.

Specification basis

NASA-HDBK-1009A (2025), sections 8 and 9 and the V&V matrix figures. It is a NASA handbook, not part of the OMG specifications, so the library is non-normative and every check is a warning. Adds the source docs/project/spec-compliance/02-detailed-semantic-compliance-map/42-hdbk1009-extension-library.md; the extension-library and document-query sources are updated for the new unit and relationship kind.

How it was verified

  • go build ./..., go vet ./..., gofmt -l . clean.
  • make extension-libraries-pin-check, make docs-counts, make diagnostics-check, make spec-compliance-check, scripts/changelog.py check, scripts/check-doc-ids.py pass.
  • go test over ./tests/hygiene ./tests/kpar ./examples/... ./internal/translate/export ./tests/corpus ./internal/check/... ./internal/workspace/... and go test -C tools ./... pass with the training, pilot and spec-example corpora required. The full go test ./... was run before the last baseline re-record and failed only on those baselines.
  • New tests: internal/check/passes/hdbk1009_test.go (including several subsystem requirements with no system requirement, in one document and across two, a derivation naming one requirement at both ends, and one between two feature-chain paths to one inherited requirement, which the relationship edges tell apart by the path each end is written as, including a::r from b::r and a nested part's from its enclosing part's, while one requirement named two ways, r and p.r, p.r and p::r, an inherited r and c.r inside c, or a::r and a rooted or re-exported name for it, still counts as a derivation from itself), internal/workspace/model/hdbk1009_recorded_test.go (cross-document facts through interface records), TestExecuteRelatedDependency.
  • Baselines re-recorded and adjudicated: pilot differential (940 files; the demo adds 8 OpenSysML-only HDBK1009 warnings and 7 pilot-only reflective-binding warnings of the kind already documented for the NPR 7123 demo), api-json differential (951 fragments, no existing row changes bucket), structure differential, corpus and api-json round trips (the demo is stable in both), agreement ratchet.
  • Extensions Library main validates clean after fix: standardize Go version to 1.23 and correct stdlib file count #24 merged (21 units, 0 errors, 0 warnings).

Checklist

  • make test and make lint pass locally (targeted packages above rather than the whole race suite after the final re-record)
  • Tests added or updated for the change
  • Documentation extended where it already covers the surface (see CONTRIBUTING.md)
  • Changelog entry added as changes/unreleased/<slug>.<section>.md, not as an edit to CHANGELOG.md
  • baselines regenerated and make docs-counts run if a gate count moved (compliance rows need nothing: the census is counted at docs build)
  • No internal work-item labels (waves, slices, F4, K5) in the body, docs, or changelog

Captain opened this PR for Jason
Implemented in session Implement NASA-HDBK-1009A mapping like NPR 7123.1
Review with Devin · Open in Devin Desktop


devin-ai-integration Bot and others added 3 commits November 20, 2026 06:25
Vendor HDBK1009 from the OpenSysML Extensions Library, add HDBK1009Pass
(warnings, codes hdbk1009-*) reading derivations, traces, refinements,
verifications and satisfactions across the workspace, the hdbk1009 demo and
its design page. RelatedElements accepts the relationship kind "dependency",
and interface records carry dependencies, refinements and verifications.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Pin the extension libraries at 2a2cd27 (HDBK1009 beside the libraries develop holds), bump the interface format version to 27 and re-record the baselines the new library and demo move.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

- a negated satisfy no longer counts as a validation link
- a recorded document's declarations are classified from their facts, so its kinds still arm the rules
- the interface record keeps every derivation the model reads, a connection typed by Derivation included
- a satisfy or verify that declares its requirement is judged like any other requirement
- a lone subsystem requirement is not the level above itself

Co-Authored-By: jason.han <hanhuijun@gmail.com>

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

devin-ai-integration Bot and others added 4 commits November 24, 2026 05:30
…o and library

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…equirement

Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

…irement from a self-derivation

A derivation edge now keeps the feature path each end is written as, so
`a.r` derived from `b.r` (both parts typed by one definition) relates two
requirements and the NASA-HDBK-1009A audit no longer reports r underived.
A derivation naming one path at both ends still derives nothing, and is
not written to an interface record.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration Bot and others added 3 commits November 24, 2026 09:39
…owever its ends are written

A requirement named bare at one end and through the part that declares or
holds it at the other (`r` and `p.r`, `p.r` and `p::r`) is one requirement, so
the derivation gives it no origin; two paths to one inherited requirement
(`a.r` and `b.r`) stay two.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…o requirements

A bare name is led by the enclosing feature that inherits it and a qualified
name by its qualifiers, so `outer.r` and `inner.r` written inside inner, and
`a::r` and `b::r`, stay two requirements while `r` and `c.r` inside c are one.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
A derivation path keeps only the features its requirement is inherited
through, so a namespace qualifier (`$::M::a::r`, `Q::a::r` where Q re-exports
a) no longer makes `a::r` look like a second requirement.

Co-Authored-By: jason.han <hanhuijun@gmail.com>

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 1 finding. Devin automatically fixed it.

Fixed by Devin (1)
  • Recorded part aliases hide self-derivations — Reproduced (top to h.t where part h only aliases top, recorded or not). A feature is now a path step only when a type it conforms to declares the next segment; regression cases added. Committed locally, pushed with the next authorized push.

View findings in Devin Review · Follow Devin's work

Devin Review

devin-ai-integration Bot and others added 6 commits November 24, 2026 10:36
…ot how they are spelled

A derivation end is now identified by the requirement it resolves to and the
features that inherit it, read from the resolver's own per-segment results. A
namespace, or a feature that declares the next segment, is no step, so a
root-qualified name, a chain mixed with a qualified name, a re-exporting
package and `this.r` all name the one requirement, while `a.r` and `b.r`
inheriting one r stay two.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…face record

Co-Authored-By: jason.han <hanhuijun@gmail.com>
Re-record the derived census, the answered-not-exported agreement ratchet and the pilot differential figures over the merged tree.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…its the next segment

A part that only aliases a requirement declared elsewhere does not inherit it, so a derivation from the requirement to that alias is a self-derivation.

Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ther's members

A reference bound to one element of a part sequence conforms to nothing, yet a chain through it reads that part's requirement, so it is a step of the path.

Co-Authored-By: jason.han <hanhuijun@gmail.com>

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 1 finding. It is left for you to triage below.

View findings in Devin Review · Follow Devin's work

Devin Review

devin-ai-integration Bot and others added 4 commits November 26, 2026 00:43
Co-Authored-By: jason.han <hanhuijun@gmail.com>

# Conflicts:
#	docs/project/api-json-differential.md

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

This branch has not been deployed

No deployments
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