Skip to content

chore(#973): partition the 48 OCAF-family packages that belonged to no pass - #987

Merged
gsdali merged 4 commits into
mainfrom
chore/973-ocaf-package-partition
Aug 20, 2026
Merged

chore(#973): partition the 48 OCAF-family packages that belonged to no pass#987
gsdali merged 4 commits into
mainfrom
chore/973-ocaf-package-partition

Conversation

@gsdali

@gsdali gsdali commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

What & why

#807's characteristic defect is a package that belongs to no pass: #382 left three Wire files
unclaimed for weeks, #384 left seven assembly files unclaimed until challenged, #377 records three
files holding the repo's highest-scoring duplication that belong to no pass at all, and #810's
census found six packages in its own lane that no sub-issue named. #973 is that defect at package
scale, and this PR is the partition that ends it.

48 packages, 459 headers of the pinned kernel belonged to no pass. They now have owners, and
Scripts/repro/973-ocaf-package-partition/partition_census.py is the census-rule artifact that
enumerates every OCAF-family package, prints which pass owns it, and exits 1 if any has none.

This is issue-body and artifact work. No Sources/ change, so no build.

Closes #973

The partition

61 packages, 737 headers, 142 classes reached from the bridge.

owner pass packages headers wrapped
#810 Pass 3, Document/XDE assembly (already owned) 13 278 118
#982 Pass 3b, OCAF framework layer (new) 5 51 9
#983 Pass 3c, OCAF persistence and format drivers (new) 38 342 8
#813 Pass 4c, Export and interop (gains 2) 2 22 5
#814 Pass 4d, Mesh plus presentation (gains 2) 2 39 2
#820 Phase 6 only, no lane pass 1 5 0

The decision is landed where it takes effect, not only recorded. Done outside this diff with
gh issue edit, as #973 asks:

Re-derived, not inherited

#973's title says 44 packages and ~460 headers; the table in its body lists 43 rows summing to 410.
--reconcile-973 prints the comparison:

  • Every per-package header count in that table is correct against the pinned kernel.
  • Five whole packages are missing from it, 49 headers: LDOM (24), ShapePersistent (13),
    UTL (1), FSD (7), Plugin (4). The first three are ApplicationFramework packages a
    prefix-shaped derivation cannot see, because their names do not begin Bin, Xml, Std, T or
    App.
  • 410 + 49 = 459, which is the "~460" the prose gives. The prose total was right and the table
    under it was not, the reverse of the usual direction. The prose "44" was wrong against both.

LDOM also shows why the split needs care: 3 of its 24 headers (LDOMParser.hxx, LDOMString.hxx,
LDOMBasicString.hxx) do not carry the package underscore, so a naive split reports 21. There are
exactly four such headers in the kernel and --reverify-family fails if a fifth appears.

Two corrections to #973's own suggestions

  • Resource_ is Pass 4c's, not Phase 6's. Refman coverage: 44 OCAF-family packages (~460 headers) belong to no pass #973 guessed Phase 6 because OCAF's format
    registration uses it. Measured: a public ResourceManager Swift type, thirteen operations in
    docs/API_REFERENCE.md, a bridge home in OCCTBridge_IO.mm, and twelve of its seventeen OCCT
    consumers outside OCAF being DESTEP_, DEIGES_, STEPControl_, STEPCAFControl_, StepData_,
    XSAlgo_, ShapeProcess_ and Units_. Resource_Unicode::SetFormat is the STEP and IGES text
    encoding switch specifically. Two independent constructions agree.
  • Four of Refman coverage: 44 OCAF-family packages (~460 headers) belong to no pass #973's 43 rows are not OCAF at all and were swept in by a Bin*/Std* prefix:
    StdFail_ (the kernel exception vocabulary), StdPrs_ and StdSelect_ (Visualization/TKV3d),
    BinTools_ (ModelingData/TKBRep). They are kept in the table with that recorded, because
    deleting them would put them straight back into being owned by nobody.

The one package that belongs to no pass, on purpose

StdFail_. 56 OCCT packages reference it, every one outside OCAF and spread across every lane, so
no lane has a better claim than any other. Nothing wraps it as a capability: it is what the bridge
catches, not what it calls, and the only claims docs/ makes about it are convention statements in
docs/naming-conventions.md. Recorded as #820's, and --verify-lanes fails if any lane starts
naming it
, which is the inverted form of the same check.

CHANGELOG entry

Every OCAF-family package now belongs to a pass of the refman-coverage epic (#973)

Forty-eight packages and 459 headers of the pinned kernel were named by no sub-issue of #807, the
refman-coverage epic, and would have arrived unannounced at its final whole-surface pass. They are
now partitioned, and the partition is a committed, re-runnable artifact:

python3 Scripts/repro/973-ocaf-package-partition/partition_census.py
python3 Scripts/repro/973-ocaf-package-partition/partition_census.py --verify-lanes

Two new passes were filed for the bulk of it, #982 (the OCAF framework layer: TFunction_,
TPrsStd_, TObj_, AppStd_, AppStdL_) and #983 (OCAF persistence and format drivers: PCDM_,
Storage_, FSD_, Plugin_, LDOM_ and every Bin*/Xml*/Std* driver package). Pass 4c
(#813) gained BinTools_ and Resource_, Pass 4d (#814) gained StdPrs_ and StdSelect_, and
Pass 3's (#810) lane text was corrected to name the six packages its own census already claims.
StdFail_ is recorded as belonging to no lane pass on purpose, with its reason.

The census exits 1 on any family package with no owner, on a header count that has drifted from the
pinned kernel, and, under --verify-lanes, on an owning issue whose ## Lane no longer names what
it owns. No Sources/ or docs/ change: this is ownership, not coverage, and each owning pass
still runs its own per-class audit.

SemVer impact

NONE. No public API, no behaviour, no Sources/ and no docs/ change. The diff is one new
Scripts/repro/ directory.

Checklist

  • New or changed behavior is covered by a unit test in the same PR (not just manual
    verification), see SecondMouseAU/OCCTReconstruct#397
    for the ecosystem-wide test-coverage standard this is piloting.
  • Every new test and every new --self-test case was run once with its subject broken, and the
    failure is reported here, see okf/policies/prove-the-test-fails.md.
  • The CHANGELOG entry above is complete, and docs/CHANGELOG.md is not in this diff.
  • The SemVer impact above is stated, and docs/SEMVER.md is not in this diff.
    It is assessed at release on main, not per PR.

Notes for the reviewer

Prove the test fails: both matrices were run, and both found something

Full transcripts are in Scripts/repro/973-ocaf-package-partition/README.md. Summary:

Removal matrix (each accepting or rejecting shape in the two detectors, 15 self-test cases):

removal result
R1 drop the backtick anchor FAILED 1 of 15
R2 drop the [^`\n]* walk inside the backtick run FAILED 1 of 15
R3 drop the (?:_|\*|\b) tail assertion FAILED 1 of 15
R4 drop the header-package override lookup FAILED 2 of 15
R5a remove a package reason that has a group fallback PASSED 15 of 15, correctly
R5b remove a group reason with no package fallback FAILED 5 of 15
R6 point a package at an owner not in OWNERS FAILED 1 of 15

R2 initially passed, so the prefix walk was decorative and a case was added that exercises it.
No ## Lane is written that way today, so that one synthetic case is the only thing holding the
shape; the README says so rather than leaving the next reader to infer it. R5's original single
form is what became R5a, and it proved nothing on its own.

Injection matrix (each guard in the run modes):

injection expected observed
I1 TDF baked as 52 headers exit 1 exit 1, TDF: baked 52 headers, pinned kernel has 51
I2 Storage given an unknown owner exit 1 exit 1
I3 StdStorage deleted from the table exit 1 exit 0 at first
I4 TObj marked as not in the module exit 1 exit 1, membership drifted: only in kernel ['TObj']
I5 StdPrs assigned to #812 exit 1 exit 1
I6 StdFail assigned to #814 exit 1 exit 1

I3 is the real finding. Deleting a package from the table exited 0: the prefix sweep printed it
as a note and the run passed. A census whose own failure mode is "a package belongs to no pass"
cannot report all clear when a package leaves its table, so the sweep is now a failure backed by an
explicit PREFIX_SWEEP_EXCLUSIONS table (empty today). Re-run: exit 1,
1 prefix-matching package(s) in neither FAMILY nor PREFIX_SWEEP_EXCLUSIONS: StdStorage.

Gates

All seventeen gate-scripts invocations from ci.yml run locally and green, plus this artifact's
own two (--self-test, plain run).

Trade-offs and known limits, stated rather than left to be found

gsdali and others added 2 commits August 20, 2026 10:45
…o pass

#807's characteristic defect is a package that belongs to no pass, and #973 is that
defect at package scale: 48 packages and 459 headers of the pinned kernel were named
by no sub-issue of the refman-coverage epic.

`Scripts/repro/973-ocaf-package-partition/partition_census.py` is the census-rule
artifact for the partition. It enumerates every OCAF-family package in the pinned
kernel, prints which pass owns it, and exits 1 if any has no owner, so the set can be
re-checked rather than re-derived by hand.

The family is derived rather than chosen, in four mechanical tiers: OCCT's own
`ApplicationFramework` module (43 packages, 509 headers), packages outside it whose
every OCCT consumer is an OCAF package (7), the XDE attribute layer already in Pass 3's
lane (6), and five packages that reached #973's own table only by matching a `Bin*`,
`Xml*` or `Std*` prefix and are not OCAF at all.

The ownership decisions are landed in the issue bodies, not only here: two new passes
were filed (#982 Pass 3b, the OCAF framework layer, 5 packages and 51 headers; #983
Pass 3c, OCAF persistence and format drivers, 38 packages and 342 headers), #813 and
#814 gained two packages each, #810's `## Lane` was corrected to name the six packages
its census already claims, and `StdFail_` was recorded as belonging to no lane on
purpose. `--verify-lanes` fails if a `## Lane` and this table stop agreeing.

Re-derived rather than inherited. #973's title says 44 packages and ~460 headers; its
table lists 43 rows summing to 410. Every per-package count in that table is correct
and five whole packages are missing from it (`LDOM` 24, `ShapePersistent` 13, `UTL` 1,
`FSD` 7, `Plugin` 4), so 410 + 49 = 459, which is the prose figure. The prose header
total was right and the table under it was not; the prose package count was wrong
against both.

Two corrections to #973's own suggestions, both measured: `Resource_` is Pass 4c's
rather than Phase 6's (it has a public `ResourceManager` Swift type, thirteen
operations in `docs/API_REFERENCE.md`, a bridge home in `OCCTBridge_IO.mm`, and twelve
of its seventeen OCCT consumers are STEP, IGES and Units), and folding the persistence
layer into #813 was rejected because that lane is 192 headers and the layer is 342.

The removal and injection matrices are in the directory's README. One injection found a
real hole: deleting a package from the table exited 0, because the prefix sweep printed
a note rather than failing. It fails now, backed by an explicit exclusion table.

Closes #973

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The rejected-alternative figure said folding the persistence layer into #813 would
produce a pass 84% larger than the largest in the epic. That compared 512 against
#810's 278, which is not the largest: Pass 4d is 329 headers, and 368 after gaining
StdPrs_ and StdSelect_ from this same partition. Re-measured, the correct statement is
192 + 342 = 534, nearly three times Pass 4c's own size and 45% larger than Pass 4d.

The conclusion is unchanged; the number that supported it was taken against the wrong
neighbour, which is the failure okf/policies/measure-dont-assume.md names. #983's and
#813's issue bodies carried the same figure and are corrected too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@kilo-code-bot

kilo-code-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

Code Review Summary

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
Scripts/repro/973-ocaf-package-partition/partition_census.py 397 Unused variable NAMED_IN_LANE
Files Reviewed (3 files)
  • Scripts/repro/973-ocaf-package-partition/README.md
  • Scripts/repro/973-ocaf-package-partition/partition_census.py
  • docs/CHANGELOG.md

Fix these issues in Kilo Cloud

Previous Review Summary (commit 5a1ebee)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 5a1ebee)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • Scripts/repro/973-ocaf-package-partition/README.md
  • Scripts/repro/973-ocaf-package-partition/partition_census.py

Reviewed by nemotron-3-ultra-550b-a55b:free · Input: 287.2K · Output: 4.9K · Cached: 777.6K

gsdali and others added 2 commits August 20, 2026 13:44
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
return [c for c in classes if re.search(r"\b" + re.escape(c) + r"\b", haystack)]


NAMED_IN_LANE = re.compile(r"`[^`\n]*")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

SUGGESTION: Unused variable NAMED_IN_LANE

The regex NAMED_IN_LANE = re.compile(r"[^\n]*") is defined on line 397 but never referenced anywhere in the file. It appears to be dead code and should be removed.

Suggested change
NAMED_IN_LANE = re.compile(r"`[^`\n]*")

Reply with @kilocode-bot fix it to have Kilo Code address this issue.

@gsdali
gsdali merged commit 90917a7 into main Aug 20, 2026
6 checks passed
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.

Refman coverage: 44 OCAF-family packages (~460 headers) belong to no pass

1 participant