Repository navigation
refactor(structure): S5 — separate partner declarations from delivery machinery - #163
Merged
Merged
Conversation
…ct/ (pure move) Part 1 of #153. NO behaviour change: file moves plus import rewrites only. The behavioural half — decoupling the wire from the partner's product — is the next commit, deliberately separate so this one is reviewable as a move. views_postprocessing/ now has three top-level packages, each answering a different question: delivery/ what makes a delivery VALID — representation-free invariants contract/ how a delivery is BUILT — the ADR-013 machinery (NEW) unfao/ who a delivery is FOR — product, appwrite_env, manager Moved into contract/: wire/ (7 modules), frames, frame_extraction, track_a_source, gaul_lookup, gaul_schema, enrichment, historical, source_metadata, store_metadata, launch_config. unfao/ keeps product.py, appwrite_env.py and managers/ — 3 files, all genuinely FAO. Structure now matches ADR-002's declared layering, which S6 will re-state (its illustration still names unfao/extraction.py as the seam, deleted in #151). Imports rewritten across 28 files + tests + scripts. test_input_integrity_ design_contract.py's path assertions follow the move. ruff clean; 295 passed, 5 known local pyarrow byte-parity failures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…; column contract as data Part 2 of #153 (part 1 was the pure move). Closes register C-69 and C-70. THE MOVE EXPOSED A REAL COUPLING. With everything under unfao/ it was invisible: wire/sink.py imported unfao.product — not in its logic, but as DEFAULT ARGUMENT VALUES for upload_enabled, consumer_name and s_min. The parameters already existed, so DIP was satisfied; the defaults reached back into the partner anyway. They are now required arguments the manager supplies explicitly. The mechanism declares what it needs; the partner provides it. contract/ now contains no code reference to unfao. #155 makes that mechanical. C-70 folded in, because gaul_schema is partner-neutral machinery and this was the one time it was being handled: COLUMNS declares each column's (name, role, wire_dtype) once and METADATA_COLS / CODE_COLS / NAME_COLS / COORD_COLS / WIRE_DTYPE derive from it. One list had been carrying three meanings — membership, normative wire ORDER, and null-gate scope — while its comment named only the first, and the dtype policy was re-derived positionally in three modules. Two tests pin it: the derivation itself (roles partition the nine exactly; the §5.1 dtype ruling holds), and the normative order written out literally so a reorder fails with a readable diff rather than only as a fixture byte mismatch. Verified the derived lists are byte-identical to the hand-written ones they replace, and the byte-parity fixtures are unaffected. ruff clean; 297 passed, 5 known local pyarrow byte-parity failures. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 31, 2026
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.
Closes #153 · Epic #148 · Register C-69 and C-70 closed · The clone-enabling change
Two commits, deliberately separate so the move is reviewable as a move.
S5a — the move (no behaviour change)
views_postprocessing/now has three top-level packages, each answering a different question:delivery/contract/wire/+ frames, gaul asset, artifact builders, external-fact readersunfao/product.py,appwrite_env.py,managers/— 3 files, all genuinely FAO~800 lines moved out from under one partner's name. Imports rewritten across 28 files plus tests and scripts.
S5b — the coupling the move exposed
This is the part that mattered. With everything under
unfao/it was invisible:Not in its logic — as default argument values. The parameters already existed, so DIP was satisfied on paper; the defaults reached back into the partner anyway. A clone importing this wire would have silently inherited FAO's consumer name and FAO's collapse floor.
They are now required arguments the manager supplies explicitly. The mechanism declares what it needs; the partner provides it.
contract/now contains no code reference tounfao. #155 makes that mechanical rather than conventional.C-70 folded in
gaul_schemais partner-neutral machinery and this was the one time it was being handled.COLUMNSdeclares each column's(name, role, wire_dtype)once;METADATA_COLS,CODE_COLS,NAME_COLS,COORD_COLSand a newWIRE_DTYPEmap all derive from it. One list had been carrying three meanings — membership, normative wire order, and null-gate scope — while its comment named only the first, and the dtype policy was re-derived positionally byif col in CODE_COLSin three modules.Two tests pin it: the derivation (roles partition the nine exactly; the §5.1 dtype ruling holds) and the normative order written out literally, so a reorder fails with a readable diff rather than only as a fixture byte mismatch.
I verified the derived lists are identical to the hand-written ones they replace before relying on them.
Verification
ruffclean · 297 passed, 41 xfailed · the 5 failures are the known local pyarrow byte-parity tests; CI authoritative.The byte-parity fixtures are untouched and must stay green — that is the proof this was a restructure and not a contract change.
Register: 71 concerns, 27 open, 44 resolved. Integrity guard green.
🤖 Generated with Claude Code