Repository navigation
0.3.129 - two promises about not connecting
Found from CI, not from a report: of 141 workflow runs, every single one
had failed. The last two failures were a validate-stage assertion and an
internal-error assertion reading connect/COM_ERROR - because CI has no CATIA.
The tests were the symptom. The cause:
- THE SERVER OPENED A SESSION FOR EVERY TOOL
_execute_tool connected before dispatching everything except connect and
disconnect. So catia_server_info - added in 0.3.127 and documented as "never
connects, it answers connected=false" - started CATIA to read a version, and
catia_read_drawing (0.3.128, "parses a file, nothing else") could not read a
file without a session either.
Both tools now declare NO_SESSION and the server honours it. The declaration is
opt-in, so a tool that needs a session still gets one - asserted in both
directions, because "no session needed" is exactly the kind of flag that spreads
until nothing connects.
- catia_drawing_add_frame CONNECTED BEFORE CHECKING ITS ARGUMENTS
Its comment has said "everything that can be refused BEFORE the sheet is touched"
since 0.3.68 - but the four lines above that comment connected and grabbed the
active drawing. So margin=-5 and title_block.width=0 needed a live session to be
told they were typos, and on CI came back as a connect-stage COM error, which
sends the caller to check their session instead of the number they passed.
The connect now sits where the sheet is touched, below the argument checks.
- TWO TESTS DEPENDED ON THIS MACHINE
Both assert the SHAPE of a failure envelope, not anything about CATIA, but both
built a real server - so they passed only where CATIA happened to be running.
One now refuses on an argument alone (a zero-width title block instead of an
oversized one: judging oversize needs the sheet size, so it cannot be an
argument-only refusal); the other stubs the connect. Three new tests hold the
line: a session-free tool must not open a session, a tool that needs one must
still get it, and add_frame must refuse before it connects.
VERIFIED THE WAY CI SEES IT: those files run with ensure_connected replaced by a
COM error, which is the CI condition - 57 pass. Then the real run: workflow
43591584778, test (3.10) success and test (3.12) success, the first green run in
the repository's history.
2076 tests. 151 tools. 421 files, 2191592 bytes.