Repository navigation
§ 4.4 code half: the lifecycle engine reads its vocabulary, terminal statuses and immutability point from a registered DomainProfile (RULING C2; ASK-4 5634195861) - #14
Conversation
…4 Q1/Q3/Q4/Q5)
openXdox is the domain-mapping CORE, parameterized by a profile a descendant
supplies (RULING C2, openxFactory#656 2026-09-04T17:47Z). It shipped one
domain's words instead: openxFactory's own `Status:` taxonomy as literals in
`gate_console.py` and `generator.py`, which is verbatim the failure
`domain-mapping-declaration` names. This is the object those literals will read
instead; no engine site moves in this commit.
The shape is RULED, not invented — ASK-4, Brett Heap, comment 5634195861
("recommendations on all five, proceed"), against the design note and schema at
openXdox-spec (#8, 446a13f5):
* Q1 BOTH — the YAML is canonical, `DomainProfile` is the runtime form, and
`load()` is the one place a malformed profile is refused rather than at
twenty call sites.
* Q2 the schema stays at openXdox-spec and is NOT vendored: `load()` checks the
fields this ENGINE consumes, which is a narrower promise than a copy free to
drift from its home.
* Q3 v1 ENFORCES the vocabulary (`require_status`) and the immutability point
(`is_immutable`); transitions and authorities are parsed, typed and readable
and nothing here refuses an undeclared move — stated rather than implied.
* Q4 `terminal_statuses` is PER KIND.
* Q5 ONE registration (`register()`), late resolution (`current()`), and a
refusal — `DomainProfileNotRegistered`, quoting the exact registration call —
when nothing is registered. There is NO fallback to the words this package
used to hardcode: that fallback is how the literals would have survived this
refactor invisibly, and it is the permissive default the capability refuses.
Resolve by ROLE, never by word: `status("organized")`, not `statuses["staged"]`,
so a descendant whose organized status is spelled `triaged` needs no engine
change. Ambiguity is refused naming both candidates, never resolved by order.
`current()` also consults `opendox.domain_profile` when this leg's registry is
empty — late, optional, and only in the lawful direction (openXdox pins
openDox) — so the ONE host registration Q5 rules can serve both legs once § 4.3
lands. A delegation, never a default: with neither registry holding a profile,
the refusal stands.
The fixture is a vendored copy of openXdox-spec's worked example carrying the
CORRECTED taxonomy: nine statuses including `projection`, out of band and NOT
immutable, plus a `projection` kind declaring `addenda: regenerated` with the
required `note` (retraction 5633989351; openXdox-spec #11). An out-of-band
never-freezing status loads, and `immutability_point` stays required and
enforced for every kind that does freeze.
Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Reviewer's GuideThis PR parameterizes the lifecycle engine around a registered domain profile: profiles are parsed into immutable runtime objects, resolved only when accessed, and used for vocabulary, terminal-status, transition-destination, and immutability decisions instead of shipping domain-specific status words. It also adds a corrected, hermetic engineering profile fixture for exercising the contract and forward-compatible profile shape. Sequence diagram for late domain profile registration and lifecycle accesssequenceDiagram
participant Host as Descendant adapter
participant Profile as openxdox.domain_profile
participant Engine as Lifecycle engine
participant Upstream as opendox.domain_profile
Host->>Profile: load(profile_yaml)
Profile-->>Host: DomainProfile
Host->>Profile: register(DomainProfile)
Engine->>Profile: current()
Profile-->>Engine: registered DomainProfile
Engine->>Profile: status(role)
Profile-->>Engine: domain status word
Engine->>Profile: terminal_statuses(kind)
Profile-->>Engine: per-kind terminal statuses
Engine->>Profile: is_immutable(kind, status)
Profile-->>Engine: immutability decision
State diagram for profile resolution and refusalstateDiagram-v2
[*] --> Unregistered
Unregistered --> Registered: register(load(profile))
Registered --> Registered: current()
Unregistered --> UpstreamLookup: current()
UpstreamLookup --> Registered: upstream profile available
UpstreamLookup --> Refused: no profile available
Refused --> Registered: register(load(profile))
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
…16-17 of 17) Both `"staged"` literals in the declared-origin reader — the `kind:` test and the marker it returns — were openxFactory's own word inside the domain-neutral package. They now read `_declared_origin_kind()`, the status the profile declares the `demote` transition lands on. One accessor serves this reader and the manifest `gate_console.py` writes, which is the point rather than a convenience: the record the forward gate writes and the record the reverse gate reads have to agree, and they now agree BY CONSTRUCTION instead of by two literals that happened to match. Resolved late, per call. Importing `openxdox.generator` still registers nothing and resolves nothing. Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…es 1-15 of 17)
The status words this module carried were openxFactory's own taxonomy inside
the domain-neutral package — the defect `domain-mapping-declaration` names. All
fifteen occurrences here now resolve through the registered profile:
* `DRAFT_STATUS` / `STAGED_STATUS` stop being constants and become
`_draft_status()` / `_staged_status()`. `gate_console.STAGED_STATUS` and
`.DRAFT_STATUS` still work for any importer, through a module-level
`__getattr__` (PEP 562) resolved on first ACCESS — so `import
openxdox.gate_console` still registers nothing, resolves nothing and refuses
nothing, and an importer that never drives the lifecycle never needs a
profile.
* the two `"kind": "staged"` record literals (the transition manifest's
destination and the execution receipt's) read `_demote_destination()`, the
status the profile declares the `demote` transition lands on — the same
accessor `generator.py`'s declared-origin reader uses, so the record the
forward gate writes and the record the reverse gate reads agree by
construction.
* `("rejected", "superseded")` reads `terminal_statuses(...)` — RULED ASK-4 Q4,
per KIND, because those two words are the possibles REGISTER's vocabulary and
not the document spine's.
BY ROLE, BY ACT, NEVER BY A NAME THIS PACKAGE WRITES DOWN. A kind is named
through the act that operates on it (`kind_declaring("demote")`,
`kind_declaring("promote-to-staging")`) rather than by writing
`governance-document` or `register-possible` into a neutral module: a
descendant calls its governed prose and its candidate register something else.
What the engine keeps is its OWN verb list — `demote` and
`promote-to-staging` are the gate console's API surface, not status words —
and it looks the domain's words up by them. `MedxDox` needs no engine change.
The vendored fixture gains the `register-possible` kind the source example
itself says it would gain "when the register's own vocabulary is declared".
The engine now asks for that vocabulary, so a fixture without it would prove
the accessor against a profile no real host could supply. The openxFactory half
must declare it.
Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Lifecycle integration is unwired, with unresolved validation, registration, and test-coverage findings.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds a YAML-backed DomainProfile loader and registry, plus an engineering-domain profile fixture, for lifecycle vocabulary, terminal statuses, and immutability rules. Lifecycle consumers and focused tests remain unwired.
Changes:
- Adds profile parsing, validation, lookup, immutability, and registration APIs.
- Adds an engineering-domain YAML fixture.
File summaries
| File | Review findings |
|---|---|
src/openxdox/domain_profile.py |
Critical (3): Lifecycle consumers remain hardcoded and unwired. Moderate (2): Non-freezing immutability checks bypass vocabulary validation. Moderate (3): Malformed scalar fields can raise raw TypeError. Nit (2): Focused regression tests are missing. Moderate (2): Duplicate registration silently overwrites the profile. Nit (1): Missing-field diagnostics misstate the gates requirement. Moderate (1): Upstream accessor errors are swallowed. Moderate (1): Non-boolean YAML values are coerced. Moderate (1): Duplicate artifact kinds are accepted. |
tests/fixtures/openxfactory-engineering-profile.yaml |
Nit (2): Fixture is unused; registration and focused tests are missing. |
Review details
Suppressed comments (4)
src/openxdox/domain_profile.py:790
- The missing-field diagnostic says that acts and gates are both mandatory and that none of the axes is optional, but the profile contract makes
gatesoptional when acts name an inline gate and this loader intentionally omits it fromREQUIRED_TOP_LEVEL. When another field is missing, this message therefore reports a requirement the loader does not enforce; align the diagnostic with the actual contract.
"""
origin: str | None = None
if isinstance(source, Mapping):
raw: Any = source
src/openxdox/domain_profile.py:892
- Catching every exception from the upstream accessor converts real upstream defects—such as a malformed registration or an accessor bug—into
None, after which this leg raises the misleadingDomainProfileNotRegistered. Handle only the upstream 'not registered' condition and let unexpected failures propagate so configuration errors are diagnosable.
def is_registered() -> bool:
"""Has a profile been registered here, without resolving or refusing?"""
return _registered is not None
src/openxdox/domain_profile.py:546
bool(...)coerces malformed YAML instead of validating it:human_only: "false"andcontradiction_legal: "false"are loaded asTrue. These flags are persisted in the runtime profile, andhuman_onlywill affect authority semantics, so reject non-boolean values rather than silently changing behavior.
src/openxdox/domain_profile.py:837lifecycle_for()returns the first matching lifecycle, but the loader only checks that each kind exists; duplicateartifact_kindentries are accepted. A malformed profile with two lifecycle declarations for one kind will therefore silently select one forstatus,terminal_statuses, andis_immutable, making behavior declaration-order dependent. Validate uniqueness before returning the profile.
artifact_kinds=tuple(
_artifact_kind(v, i)
for i, v in enumerate(_as_sequence(data["artifact_kinds"], "artifact_kinds"))),
lifecycle=tuple(
_lifecycle(v, i)
- Files reviewed: 4/4 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…ENTH site
THE GUARD FOUND ONE THE SWEEP MISSED. `tests/test_no_hardcoded_status_words.py`
parses `gate_console.py` and `generator.py` with `ast` and asserts ZERO status
words of the nine-word taxonomy, plus the register's terminal pair, survive as
literals. It failed on first run at `gate_console.py:1550` (on `main`):
readme.write_text(f"# {plan.staging_topic}\n\nStatus: staged\n" + note, ...)
— the README a demote writes for a staging topic that has none. The design
note's live sweep counted SEVENTEEN occurrences over fifteen lines and did not
see this one, because it looked for the bare token `"staged"` and for the
constant `STAGED_STATUS`, and here the word is EMBEDDED in a longer f-string.
It is migrated on the same accessor as the fragment it sits beside. **The count
is EIGHTEEN occurrences over SIXTEEN lines.** This is the argument for a guard
over a careful reading, in one line of evidence.
The guard also asserts what a zero-literal count cannot see on its own: that
each module still READS the profile (a module that neither hardcodes a word nor
reads a profile has not been parameterized, it has been emptied); that nothing
resolves a profile at MODULE level (late by contract, so an importer that never
drives the lifecycle never needs one); and that no ARTIFACT KIND of any domain
is named either — a kind's name is a domain's word too, reached through
`kind_declaring(<act>)`. It is a source sweep, not an import, so it runs
without `doc_health` and keeps working whatever the BUILD arc does to the rest
of the suite.
`conftest.py` at the repository root makes the HOST's registration at
test-process start, unconditionally and never behind a try/except: a suite that
silently ran with no profile would be a suite in which the refusal this slice
installs looks like a passing test. That is not a test convenience standing in
for the contract — process start is where a host registers, and this is it.
`tests/test_domain_profile.py` covers the loader (every required field refused
BY NAME, referential integrity against the declared vocabulary, forward
tolerance of fields a later schema revision adds), role resolution and its
ambiguity refusal, per-kind `terminal_statuses`, the immutability point
including the never-freezing `regenerated` case and its required reason, and
registration / late resolution / the refusal — asserting the refusal message
leaks no domain word, and asserting in a FRESH interpreter that import
registers nothing.
Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate issues affect registration, validation, custom vocabularies, and test coverage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (8)
Previously missed (1) — in code that hasn't changed since the last review.
src/openxdox/domain_profile.py:568
bool()coerces invalid YAML values instead of refusing them: for example,human_only: "false"becomesTrue. That silently changes authority semantics in the runtime profile; enforce that supplied values are actual booleans and raiseDomainProfileInvalidotherwise.
src/openxdox/domain_profile.py:576
- This helper assumes every non-string value is iterable; a malformed profile such as
terminal_statuses: 3reachesenumerate(value)and leaks a rawTypeErrorinstead of the documentedDomainProfileInvalidrefusal. Reject non-list/tuple values before enumerating them.
if value is None:
return ()
if isinstance(value, str):
raise DomainProfileInvalid(f"{where}: expected a list of strings, got a string")
return tuple(_text(v, f"{where}[{i}]") for i, v in enumerate(value))
src/openxdox/domain_profile.py:879
- The documented registration contract is
ONCE, but a later call silently replaces_registered. That lets the vocabulary change midway through a process and makes records produced before and after the call disagree; reject a second registration (leavingunregister()as the explicit test/teardown escape hatch).
if not isinstance(profile, DomainProfile):
raise TypeError(
"register() takes a DomainProfile; build one with "
"openxdox.domain_profile.load(<profile.yaml>)")
_registered = profile
src/openxdox/domain_profile.py:417
- The
never_freezesearly return skips the vocabulary check, sois_immutable("projection", "not-a-declared-status")returnsFalseinstead of refusing the out-of-vocabulary status. Validatestatusagainstorderbefore handlingnever_freezesso this path enforces the same closed vocabulary as every other kind.
if point.never_freezes:
return False
src/openxdox/domain_profile.py:474
- This accessor aggregates transitions across kinds and only checks that their destination status strings agree. If two artifact kinds declare the same act and happen to use the same destination status, it silently returns a value even though
kind_declaring()defines that situation as ambiguous and refuses it; a manifest can therefore resolve an act without a unique kind. Enforce the single declaring kind before returning the destination status.
rows = self.transitions_for(act)
return self._one(rows, act, "to", tuple(sorted({t.to for t in rows})))
src/openxdox/gate_console.py:1213
- Although this hunk moves terminal states into the profile,
promotability_refusal()still hardcodes the same register kind'slatentandpickedstatus ids (and the fallback message repeatslatent). Those ids are explicitly declared in the newregister-possiblevocabulary, so a descendant that renames them still cannot promote or refuse entries correctly. Resolve the promotable and picked roles through the declared kind as well.
if state in _terminal_register_states():
src/openxdox/generator.py:72
- The profile is consulted here only for the origin token, while
_document_exclusion_reason()still compares every document status against the module-levelLIFECYCLE_STATUSES = TAXONOMY. A descendant profile that calls its organized statetriagedwill be dropped from every snapshot as unrecognized, so custom vocabularies do not work through the generator; make that validation consult the registered profile as well.
from . import domain_profile
tests/fixtures/openxfactory-engineering-profile.yaml:31
- This fixture refers to
tests/test_domain_profile.py, but that test file is not present in the checkout (and the advertisedtest_no_hardcoded_status_words.pyguard is absent too). The new loader, registration refusal, and hardcoded-word protections therefore have no corresponding coverage in this PR; add the promised suites or remove these claims.
# `tests/test_domain_profile.py` asserts both halves of that sentence.
- Files reviewed: 8/8 changed files
- Comments generated: 1
- Review effort level: Lite
`tests/test_domain_profile.py` and `tests/test_no_hardcoded_status_words.py` join `test_leg_shape.py` and `test_dependency_direction.py` in the required check, on exactly the grounds `test_dependency_direction.py` joined under § 4.1: both are SHAPE assertions authored HERE, not carved suites. The guard PARSES the two engine modules with `ast` and never imports them; the profile suite imports `openxdox.domain_profile` alone — `yaml` and the standard library, no `doc_health`, no carved module. Neither un-narrows RULED Q-L8 (b'): the carved suites stay out until the BUILD arc makes them runnable. A guard that does not run is a comment. "A hardcoded status word is a defect under `domain-mapping-declaration`" (tasks.md § 4.4), and the literals § 4.4 removes were the OBVIOUS way to write the code while the engine and its one domain shared a repository — they will be the obvious way again the next time someone adds a status-bearing step. A defect class that recurs by default belongs in a required check. `unregistered_profile` moves from `tests/conftest.py` into the test module that uses it, because `validate` invokes pytest with `--noconftest` and a suite in that invocation may not depend on a conftest being collected. It restores whatever was registered, so a run that DID come through the root `conftest.py` — the host's process-start registration — is left as it was found. Local: `python -m pytest -q tests/test_leg_shape.py tests/test_dependency_direction.py tests/test_domain_profile.py tests/test_no_hardcoded_status_words.py --noconftest` -> 83 passed (24 unchanged from main + 59 new). Refs opensoft/openXfactory#656 Lane: openxfactory-4-opendox-extraction Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1. `is_immutable()` checked the vocabulary AFTER the never-freezes arm, so
`is_immutable("projection", "typo")` answered `False` — handing a typo the
same answer as a lawful projection and dropping the vocabulary enforcement
RULED ASK-4 Q3 for a whole class of kinds. The membership check now runs
first, for every kind.
2. `_tuple_of_text` rejected only strings, so a malformed scalar
(`terminal_statuses: 1`) reached `enumerate()` and surfaced as a raw
`TypeError` from inside the loader — the one thing `load()` promises not to
do. Every shape that is not a list of strings is now refused by name.
3. `register()` silently overwrote a previous registration, which is not what
"ONE registration" (RULED ASK-4 Q5) means. A second, DIFFERING registration
now raises `AlreadyRegistered` naming `unregister()`; re-registering the
same object stays a no-op, so an idempotent host start-up is not punished.
Swapping the vocabulary under a running engine would leave half a process
reading words the other half had stopped using, with nothing reporting it.
Findings 4-7 of the round were raised against the first commit, before the
engine sites, the suites and the registration existed; they are answered on
their threads with the commits that closed them.
Local: validate's own command -> 88 passed.
Refs opensoft/openXfactory#656
Lane: openxfactory-4-opendox-extraction
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved moderate issues remain in profile validation, registration, and hardcoded status handling.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (9)
src/openxdox/domain_profile.py:667
terminal_statusesis an engine-consumed per-kind declaration, butdata.get(...)makes a missing field indistinguishable from an explicitly empty list. A profile that omits it therefore loads with no terminal states, sopromotability_refusal()cannot reject terminal register entries; require the field while still allowing an explicit[]for kinds such asprojection.
if duplicates:
src/openxdox/domain_profile.py:576
_tuple_of_textassumes any non-string value is iterable. A scalar YAML value therefore raises a rawTypeError, while a mapping with string keys is silently accepted as those keys, instead of consistently raisingDomainProfileInvalidfor malformed known fields. Validate the container type before callingenumerate()and reject mappings.
return value
def _opt_text(mapping: Mapping[str, Any], key: str) -> str | None:
value = mapping.get(key)
src/openxdox/domain_profile.py:417
- The
never_freezesbranch returns before validatingstatus, sois_immutable("projection", "typo")returnsFalseinstead of raisingProfileLookupError. That bypasses the promised vocabulary enforcement for the non-freezing kind; perform the membership check before this early return.
def is_immutable(self, kind: str, status: str) -> bool:
"""Has an artifact of `kind` at `status` passed its immutability point?
src/openxdox/domain_profile.py:879
register()silently replaces_registered, even though the contract and this function's docstring require one host registration at process start. A second adapter or accidental late registration can switch the vocabulary mid-process and make subsequent lifecycle results use a different profile; reject a second registration, while retainingunregister()for explicit teardown/test isolation.
raise DomainProfileInvalid(
src/openxdox/domain_profile.py:564
- Known optional string fields are silently dropped when they have the wrong type. In particular,
transitions[].act: 123becomesact=None, changing a declared transition into an unacted row and deferring the failure until a later lookup instead of rejecting the profile at load time. PreserveNoneonly for an absent field and raiseDomainProfileInvalidfor present non-string values.
items = list(value)
if not items:
src/openxdox/domain_profile.py:858
- The loader only checks lifecycle kinds for membership in the declared-kind set; it never rejects two lifecycle rows for the same kind. Such a profile loads, but
lifecycle_for()returns the first row, so status, terminal-state, and immutability lookups silently depend on declaration order instead of refusing an ambiguity.
basis=_tuple_of_text(data.get("basis"), f"{where}.basis"),
artifact_kinds=tuple(
_artifact_kind(v, i)
for i, v in enumerate(_as_sequence(data["artifact_kinds"], "artifact_kinds"))),
lifecycle=tuple(
src/openxdox/generator.py:368
- The new demote lookup does not cover the later
_cluster_lineagepath, which still comparesposs.get("state") == "picked"(line 913).pickedis a declaredregister-possiblelifecycle status in the profile fixture, so a domain that renames it will silently lose those change-lineage edges even though this module now claims to read the vocabulary from the profile. Use a profile-derived register state here as well.
if origin.get("kind") != _declared_origin_kind():
tests/test_no_hardcoded_status_words.py:48
- The C2 guard omits
latent,picked, andpromoted, although the fixture declares them as statuses ofregister-possibleandgate_console.pystill embedslatent/picked. It can therefore report zero hardcoded lifecycle words while those domain-specific IDs remain in the engine; include the complete register vocabulary in the sweep or otherwise assert that these states are profile-resolved.
TAXONOMY_WORDS = frozenset({
"brainstorm", "staged", "draft", "ratified", "standard",
"superseded", "retired", "record", "projection",
})
tests/test_no_hardcoded_status_words.py:120
- The f-string guard only detects a literal part equal to a watched word or containing the exact
Status: <word>prefix. A future hardcoded value such asf"state={value}: draft"therefore passes the C2 guard, even thoughdraftis still embedded in the generated text. Scan every literalJoinedStrpart with a token-boundary check (while keeping any intentional documentation exclusions explicit).
for part in node.values
if isinstance(part, ast.Constant) and isinstance(part.value, str)
for word in WATCHED_WORDS
if f"Status: {word}" in part.value or part.value.strip() == word
- Files reviewed: 9/9 changed files
- Comments generated: 2
- Review effort level: Lite
|
Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox) Figures
Locally, that exact command: 88 passed — the 24 that pass unchanged on The whole tree, branch against
Identical failure and error counts; +64 passed, all of them this PR's own. Nothing this slice touches moves a single existing result in either direction, which is the behaviour claim the migration rests on. Those 943 failures and 181 errors are the leg's PRE-EXISTING state, not a regression and not something this PR is entitled to fix: the carved suites need openxFactory's ReviewCopilot round 1: 7 threads, 7 answered, 0 unresolved. Three were substantive and are fixed in
The other four were raised against the first commit — which deliberately added the module and moved no engine site — and are answered on their threads with the commits that closed them. Still DRAFT, and still heldLands only after openXdox-code #13 (BUILD slice 2b ratchet), per the sequencing note |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate validation and lifecycle-resolution issues remain.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (8)
Previously missed (2) — in code that hasn't changed since the last review.
src/openxdox/domain_profile.py:863
- This expression does not validate a present
gatesvalue before iterating it. A profile withgates: 1raises a rawTypeErrorfromenumerate, whilegates: {}orgates: 0is treated as if the optional field were omitted; both violate the loader's singleDomainProfileInvalidrefusal path. Validate the optional array's type explicitly, allowing only omission or a list of gate mappings.
tests/test_no_hardcoded_status_words.py:120 - The f-string guard only matches
Status: <word>or a literal part equal to the word. A new hardcoded status such asf"state=draft"would pass even though the docstring says f-string parts are swept and this guard is meant to prevent the defect from returning. Scan everyJoinedStrconstant with token boundaries (rather than only this exact header format).
src/openxdox/domain_profile.py:577
_opt_textsilently turns any present non-string intoNone. For example,transitions[].act: 123loads as an act-less transition, sokind_declaring("demote")fails later instead ofload()raising its promisedDomainProfileInvalid; the same loss affects other consumed optional fields. Reject non-Nonenon-strings instead of dropping them.
def _opt_text(mapping: Mapping[str, Any], key: str) -> str | None:
value = mapping.get(key)
return value if isinstance(value, str) and value.strip() else None
src/openxdox/domain_profile.py:581
bool(...)coerces malformed YAML values instead of validating them: a quotedhuman_only: "false"becomesTrue, even though the profile schema declares this field as boolean. Reject non-boolean values so a malformed profile cannot silently change authority semantics.
def _flag(mapping: Mapping[str, Any], key: str) -> bool:
return bool(mapping.get(key, False))
src/openxdox/domain_profile.py:684
- The transition validation checks only
fromandto; it never verifies thatt.authoritynames one ofprofile.authorities. A typo such asauthority: gate-atortherefore loads as a supposedly valid declaration even though the schema describes every transition authority as resolving to the authority axis, and the inconsistency is only discovered by a later lookup. Validate these references duringload()without adding actor-enforcement behavior.
for i, t in enumerate(transitions):
if t.to not in ids:
raise DomainProfileInvalid(
f"{where}.transitions[{i}].to: {t.to!r} is not in this kind's "
f"declared vocabulary {ids}")
src/openxdox/domain_profile.py:818
- A file containing invalid UTF-8 fails in
read_text()withUnicodeDecodeError, which is neitherOSErrornoryaml.YAMLError, soload()leaks a raw exception instead of using its documentedDomainProfileInvalidrefusal path. IncludeUnicodeErrorin this handler so all unreadable/malformed profile files are reported consistently.
raw = yaml.safe_load(path.read_text(encoding="utf-8"))
except OSError as exc:
tests/test_no_hardcoded_status_words.py:147
- This removes whole
FunctionDef/ClassDefnodes before walking the tree, but decorators, default arguments, and annotations are evaluated at module import time. A declaration such asdef f(value=domain_profile.current())would therefore evade the assertion despite violating the late-resolution contract. Exclude only function bodies while still inspecting those import-time subexpressions.
module_level = [n for n in tree.body
if not isinstance(n, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef))]
calls = [
node.lineno
for stmt in module_level
for node in ast.walk(stmt)
if isinstance(node, ast.Call)
and isinstance(node.func, ast.Attribute)
and node.func.attr in {"current", "load", "register"}
tests/test_no_hardcoded_status_words.py:168
- This assertion only searches raw source text, so the existing explanatory comments/docstrings containing
domain_profilesatisfy it even if all executable profile calls are removed. That makes the guard unable to detect the lifecycle module being emptied—the failure mode its docstring describes. Inspect the AST for an actualdomain_profilecall (as the two modules currently use) instead of checking the source substring.
text, _tree = _module_source(module)
assert "domain_profile" in text, (
f"{module} names no domain profile at all; § 4.4 parameterizes this "
"module, it does not empty it")
- Files reviewed: 9/9 changed files
- Comments generated: 2
- Review effort level: Lite
…g it Copilot review thread on PR #14 (src/openxdox/domain_profile.py:568): `_flag()` returned `bool(mapping.get(key, False))`, so a malformed YAML value such as `human_only: "false"` — a non-empty string, truthy in Python — silently became `True` instead of being refused. That changes authority metadata rather than reporting the malformed field, breaking `load()`'s promise to refuse a malformed profile once, on the way in, naming the field. `_flag()` now takes the loader's `where` context, accepts only an actual `bool` (or an absent key, keeping its False default), and raises DomainProfileInvalid naming `{where}.{key}` for anything else. Its three call sites (`Status.contradiction_legal`, `Status.excluded_from_conversion`, `Authority.human_only`) pass `where` through. Regression cases in tests/test_domain_profile.py: a string/int/list/mapping value is refused by name (parametrized, including the motivating `"false"` case), an absent key still defaults to False, an actual bool still loads, and the same helper backing a Status flag is covered too. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…le entry Copilot review thread on PR #14 (src/openxdox/domain_profile.py:882): load() checked that every lifecycle's artifact_kind was DECLARED in artifact_kinds, but not that either was declared only ONCE. `{k.id for k in profile.artifact_kinds}` is a set — a repeated artifact_kinds[].id was silently absorbed with no error — and lifecycle_for() returns the first matching entry, so a second lifecycle for an already-used kind loaded with no effect: its vocabulary, immutability point and transitions were parsed and then silently discarded. load() now refuses both shapes explicitly, by name, before returning the profile: a duplicate artifact_kinds[].id, and a second lifecycle entry for a kind already seen. Both are refused once, on the way in, on the same footing as every other malformed shape this loader enforces. Regression cases in tests/test_domain_profile.py: a duplicated artifact_kinds entry is refused, and a duplicated lifecycle entry for governance-document is refused. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… own word Copilot review thread on PR #14 (src/openxdox/gate_console.py:214): _demote_destination() called domain_profile.destination_status(DEMOTE_ACT), which reads the demote transition's `to:` spelling — a word the loader validates only against the SOURCE kind's vocabulary (governance-document). The artifact that actually gets created is a DIFFERENT kind (destination_kind(act), staging-topic), and this function's result is written as that artifact's own Status: header and as the demotion manifest's destination.kind token. A descendant profile whose staging-topic spells "organized" differently from governance-document's `to:` word would have this code write the wrong status into the new document; the two words agree only by coincidence in openxFactory's own fixture. generator._declared_origin_kind() read the identical domain_profile.destination_status("demote") for the same underlying reason (its own docstring says "one accessor serves both" this reader and the gate_console manifest, so the forward gate's write and the reverse gate's read "agree BY CONSTRUCTION"). Fixing gate_console.py alone would have broken that documented invariant for any descendant where the two words diverge, so both call sites move together. domain_profile.py gains destination_role_status(act, role): resolves `status(role, kind=destination_kind(act))` — the DESTINATION kind's own word for the role — rather than the source kind's transition spelling. Both _demote_destination() and _declared_origin_kind() now call it with ("organized" role), so they agree by construction rather than by two call sites that happen to resolve the same way today. Regression cases in tests/test_domain_profile.py: a profile where the staging-topic kind renames its organized status away from governance-document's `to: staged` proves destination_role_status resolves via the destination kind, and a same-fixture case proves no regression when the words agree. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…file too Copilot review thread on PR #14 (src/openxdox/gate_console.py:1214): the terminal-state migration (RULED ASK-4 Q4) left promotability_refusal's other two register-possible words hardcoded — `_PROMOTABLE_STATE = "latent"` and a literal `state == "picked"` check — so a descendant renaming either word would still be stuck reading openxFactory's own spelling for these two, even though terminal_statuses is already parameterized. Sweeping the same word across both engine modules found a THIRD site: generator._cluster_lineage also carried a hardcoded `"picked"` literal when reading a possible's claim on a cluster. Left alone, it would have defeated the gate_console fix's purpose the moment a descendant renamed the word — the two modules would disagree about what "picked" means. gate_console.py gains _promotable_register_state() and _picked_register_state(), resolving through `status(<role>, kind=kind_declaring(PROMOTE_TO_STAGING_ACT))` the same way `_terminal_register_states()` already does; promotability_refusal and its message text now read through them instead of the literals. generator.py gains its own _picked_register_state() (the same composition, using the act's own string since generator.py does not import gate_console's constants) and _cluster_lineage reads it instead of the literal. tests/test_no_hardcoded_status_words.py's AST guard gains REGISTER_OTHER_WORDS = {"latent", "picked"}, enforcing the fix the same way REGISTER_TERMINAL_WORDS already enforces the terminal pair — "the defect class needs a test, not a memory" (this file's own docstring). Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ain-profile-engine
There was a problem hiding this comment.
🟡 Changes recommended
Moderate validation and regression-guard gaps remain in domain_profile.py and test_no_hardcoded_status_words.py.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (3)
src/openxdox/domain_profile.py:864
- This diagnostic says
gatesis one of the required fields and that none of the listed axes is optional, butgatesis intentionally optional in the profile contract and is omitted fromREQUIRED_TOP_LEVEL. When another field is missing, the error gives the wrong remediation; clarify that gates may be omitted when acts name them inline.
f"{where}: required field(s) {missing} missing. A domain profile "
"declares all five axes of `domain-mapping-declaration` — artifact "
"kinds, lifecycle, acts and gates, evidence classes, promoting "
"authorities — plus its truth store; none of them is optional.")
src/openxdox/domain_profile.py:594
_opt_textsilently turns a present non-string (includingnull) intoNone. A malformed declaration such asact: 123ordestination_kind: 123is therefore loaded as if the field were omitted and only fails or misbehaves later, contrary to the loader's one-time field validation. Reject invalid present values and preserveNoneonly for omitted optional fields.
def _opt_text(mapping: Mapping[str, Any], key: str) -> str | None:
value = mapping.get(key)
return value if isinstance(value, str) and value.strip() else None
tests/test_no_hardcoded_status_words.py:149
- The AST guard removes every
FunctionDef/ClassDefsubtree before walking it, so it misses import-time expressions in decorators, default arguments, or class bodies. A futuredef f(value=domain_profile.current())would executecurrent()during import while this required test passes. Inspect those definition-time expressions, or verify a fresh import with no registration instead of excluding the subtrees.
module_level = [n for n in tree.body
if not isinstance(n, (ast.FunctionDef, ast.AsyncFunctionDef, ast.ClassDef))]
- Files reviewed: 9/9 changed files
- Comments generated: 7
- Review effort level: Lite
Second-round Copilot review thread on PR #14 (src/openxdox/domain_profile.py:500, raised against the first round's own destination_role_status): destination_kind() built its comparison set as `{t.destination_kind for t in rows if t.destination_kind}` — filtering out rows with no declared destination_kind BEFORE comparing. If one `demote` transition named a destination kind and another said nothing at all, the filtered set held only the declared value, `_one()` saw no disagreement, and destination_role_status() (added in the first round) would resolve a destination vocabulary that not every matching transition actually declared. destination_kind() now checks the unfiltered declarations first: if some rows name a destination_kind and others don't, it refuses by name rather than silently keeping the declared subset. The existing agree/disagree/ absent-everywhere cases (`_one()`) are unchanged. Regression case in tests/test_domain_profile.py: test_destination_kind_refused_when_only_some_transitions_declare_it removes destination_kind from one of governance-document's two demote transitions and asserts the loader refuses rather than silently answering with the one row that still declares it. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Second-round Copilot review thread on PR #14 (src/openxdox/domain_profile.py:705): when `addenda` is `regenerated`, the loader checked only that a non-empty `note` was present; it never checked that the immutability point's own status actually has role `out-of-band`. A profile could therefore declare an ordinary spine status such as `ratified` (role `ratified`) as "regenerated", and `is_immutable()` would answer `False` for it at every status, silently bypassing v1's immutability enforcement for a status this domain otherwise treats as part of its normal progression. `_lifecycle()` now looks up the immutability point's own status in the kind's vocabulary whenever `never_freezes` is true, and refuses unless that status's declared role is `out-of-band`. openxFactory's own `projection` kind (role `out-of-band`) is unaffected. Regression case in tests/test_domain_profile.py: test_regenerated_is_refused_unless_the_status_is_out_of_band declares `ratified` (role `ratified`) as regenerated, with its required note present, and asserts the loader still refuses it. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…via .get() Second-round Copilot review thread on PR #14 (src/openxdox/domain_profile.py:719): `terminal_statuses` is required by the profile contract even when the declared list is empty (openxFactory's own `projection` kind declares `terminal_statuses: []` rather than omitting the key), but the loader read it with `data.get("terminal_statuses")`, which treats a missing key and an explicit empty list identically — both reach `_tuple_of_text` as `None` and both become `()`. A profile that omitted the declaration entirely loaded exactly as if it had explicitly said "no terminal states", instead of being refused for skipping a required field. `_lifecycle()` now reads it through `_require`, which distinguishes an absent (or explicit `null`) key from a present-but-empty list; the latter still loads as `()`, the former is refused by name. Regression case in tests/test_domain_profile.py: test_an_omitted_terminal_statuses_is_refused_not_defaulted_to_empty deletes the key entirely and asserts the loader refuses rather than silently defaulting to no terminal states. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… types Second-round Copilot review thread on PR #14 (src/openxdox/domain_profile.py:866): `bool` is a subclass of `int` in Python and `True == 1`, so `data["schema_version"] != SCHEMA_VERSION` let `schema_version: true` pass as schema version 1 — a malformed profile with the wrong type accepted by an equality comparison that does not check the type. The same comparison also accepts a numerically-equal float (`1.0 == 1`). The check now requires an actual `int`, explicitly rejecting `bool` first (since `isinstance(True, int)` is also true), before comparing the value to `SCHEMA_VERSION`. Regression case in tests/test_domain_profile.py: test_a_non_int_schema_version_is_refused_even_when_equal_by_coincidence, parametrized over `True`, `False`, `"1"` and `1.0`. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Second-round Copilot review thread on PR #14 (src/openxdox/domain_profile.py:923): the post-construction validation checked lifecycle kinds and duplicate ids, but never the cross-axis references a transition or an act carries. An id declared on one axis and consumed on another was never checked against what that OTHER axis actually declares: a transition could name an undeclared `authority`, `act`, or `destination_kind` and still load, `kind_declaring()` could select an act no `acts:` entry names at all, and an act's `gate`/`target_kind`/`requires_evidence` could point at nothing. A typo loaded cleanly and surfaced only if some caller happened to look that exact id up later. load() now validates, before returning the profile: every transition's `authority` is a declared Authority id; every transition's `act` (when present) is a declared Act id; every transition's `destination_kind` (when present) is a declared artifact kind; every act's `gate` is a declared Gate id; every act's `target_kind` (when present) is a declared artifact kind; every id in an act's `requires_evidence` is a declared EvidenceClass id. `gates` is the one axis `REQUIRED_TOP_LEVEL` does not name, so the `gate` check applies only when the profile declares any gates at all — a gate-less profile is not held to a reference it never made. The other five checked axes (authorities, acts, evidence_classes, artifact_kinds, and lifecycle transitions/acts themselves) are all required and therefore never empty in a validly constructed profile. Six refusal regression cases in tests/test_domain_profile.py (one per reference checked) plus one confirming the deliberate gates exemption when the axis is omitted entirely. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…andalone tokens Second-round Copilot review thread on PR #14 (tests/test_no_hardcoded_status_words.py:129): the f-string sweep only recognized two narrow shapes — the literal substring "Status: <word>", or a part that IS just the word and nothing else. A literal such as f"status={state} (staged)" is a longer Constant part that matches neither, despite the test's own docstring claiming it sweeps every f-string part. The sweep now matches each watched word as a STANDALONE TOKEN (`\bword\b` via `_STANDALONE_WORD_RE`) anywhere in a literal part — a strict superset of the two shapes it replaces, so nothing that used to trip this test stops tripping it. Word-boundary matching alone would also flag prose already in gate_console.py that merely shares a word with the taxonomy ("the record's provenance", "gate-action record", ".ratification-record.yaml", "draft workspace", "the ratified state"); those seven lines are named individually in a new PROSE_EXEMPT set, each with its own justification, rather than silently narrowing the match back down. generator.py has no such lines today. The sweep logic is factored into `_f_string_offenders()` so it can be proven against a synthetic snippet, independent of what the two real modules currently contain: test_the_f_string_sweep_catches_a_word_embedded_in_a_longer_literal reproduces the review's own motivating example and asserts it is now caught; test_the_f_string_sweep_still_catches_the_original_two_shapes confirms no regression on what the test already recognized; test_the_f_string_sweep_does_not_flag_a_word_embedded_in_a_longer_word confirms `unstaged` does not trip `staged`. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…n, not seventeen Second-round Copilot review thread on PR #14 (tests/test_no_hardcoded_status_words.py:215): test_the_seventeen_sites_are_gone_and_the_count_is_recorded's name, docstring and assertion message all still stated the design note's ORIGINAL sweep count — seventeen occurrences over fifteen lines — while the migrated source and this guard's own docstring establish eighteen over sixteen: a first-round review on this same PR caught the eighteenth site (gate_console.py:1550 on main, a status word embedded in a longer f-string — exactly the class this guard's own f-string sweep exists to catch) and it was corrected in the same commit that added this guard (6c877a9), but this one test's recorded baseline was never updated to match. Its failure diagnostics would report the wrong count to a future reader. Renamed to test_the_eighteen_sites_are_gone_and_the_count_is_recorded; docstring and assertion message now state eighteen over sixteen and explain where the corrected number comes from. The assertion logic itself was already correct (total == 0) and is unchanged. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved moderate findings remain in profile validation, registry integration, generator behavior, and guard coverage.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (7)
Previously missed (1) — in code that hasn't changed since the last review.
tests/test_no_hardcoded_status_words.py:125
- This literal scan only matches string constants whose entire value equals a watched word. A future ordinary write such as
readme.write_text("Status: staged\\n")is a longerast.Constantand is neither checked here nor covered by the f-string scan, so the required guard can miss a new hardcoded status write. Scan relevant ordinary string literals too, with audited prose exclusions, and add a regression case.
src/openxdox/domain_profile.py:1100
- Catching
Exceptionhere converts any failure inside the upstream registry—such as a broken profile or programming error—into the local 'no profile' refusal, hiding the real failure and making a valid upstream registration indistinguishable from an absent one. Catch only the upstream's expected absence/not-registered case and let unexpected errors propagate.
try:
candidate = getter()
except Exception: # noqa: BLE001 — an upstream refusal is "not here"
return None
return candidate if isinstance(candidate, DomainProfile) else None
src/openxdox/domain_profile.py:1114
- This refusal docstring repeats the outdated seventeen-literal count even though the corrected migration count is eighteen. Update it with the same eighteen-site figure so the public explanation of why the fallback is forbidden does not contradict the guard's recorded baseline.
There is no fallback to the words this package used to hardcode. That
fallback is precisely how the seventeen literals would have survived § 4.4
invisibly, and it is the permissive default `domain-mapping-declaration`
refuses.
src/openxdox/domain_profile.py:1100
_upstream()only returns a candidate when it is an instance of this leg'sDomainProfile, but the sharedopendox.domain_profileregistry deliberately stores an opaque host module/object. The Q5 contract therefore cannot be satisfied by the documented call above: registering viaopenxdox.domain_profile.register(...)leaves OpenDox's registry empty, while registering the host object inopendoxis discarded here unless it is this exact class. Align the one-registration seam/type contract and test both accessors before relying on this delegation.
candidate = getter()
except Exception: # noqa: BLE001 — an upstream refusal is "not here"
return None
return candidate if isinstance(candidate, DomainProfile) else None
src/openxdox/generator.py:72
- Importing the profile here only parameterizes origin and register lookups;
_document_exclusion_reason()still validates every document againstLIFECYCLE_STATUSES = TAXONOMY. A valid descendant profile that spells its organized statustriagedwill therefore be excluded as unrecognized, and generation can proceed without a registered profile using the old vocabulary. Route this validation through the registered profile so generator behavior honors the same vocabulary and refusal contract.
from . import domain_profile
tests/test_no_hardcoded_status_words.py:241
- This assertion searches the raw source text, and both engine modules already mention
domain_profilein docstrings/comments. Removing every executable profile access would therefore still pass this guard, despite the test claiming to catch an emptied module. Parse the AST and require an actualdomain_profilecall/reference instead of a substring match.
text, _tree = _module_source(module)
assert "domain_profile" in text, (
f"{module} names no domain profile at all; § 4.4 parameterizes this "
"module, it does not empty it")
tests/test_no_hardcoded_status_words.py:89
- These exemptions are keyed only by the current
JoinedStrline number. Inserting or deleting lines can move a new status-bearing f-string onto one of these exempt numbers and silently disable the guard, while moving existing prose off the number creates a false failure. Key the exemption to stable source text/AST content (or another source span that verifies the expected expression), not just a line number.
PROSE_EXEMPT: frozenset[tuple[str, int]] = frozenset({
("gate_console.py", 315), # "the record's provenance names one of" (OutputBoundary refusal prose)
("gate_console.py", 319), # the same sentence's other raise site
("gate_console.py", 829), # "gate-action record " — the audit-record noun, not a status
("gate_console.py", 1066), # "'Returned drafts' record" / "returned draft proposals" — README/INDEX prose
("gate_console.py", 1675), # "draft workspace" / "draft ideas" / "draft-proposal convention" — prose
("gate_console.py", 1848), # ".ratification-record.yaml" — a filename, not a written status
("gate_console.py", 1851), # "the ratified state" — prose
})
- Files reviewed: 9/9 changed files
- Comments generated: 4
- Review effort level: Lite
…ep count The docstring said the migration moved seventeen occurrences over fifteen lines and that those seventeen sites now read this module. tests/test_no_hardcoded_status_words.py already records the corrected number: eighteen occurrences over sixteen lines (a first-round review caught the eighteenth site, gate_console.py:1550 on main, which the design note's original sweep missed). Update the docstring's three mentions (lines 15, 19, 1112) to the same eighteen/sixteen the guard and the migrated source agree on. The two other 'seventeen' mentions in the tree (gate_console.py:1648-1649, test_no_hardcoded_status_words.py lines 10/277) are left as-is: both describe the design note's ORIGINAL undercount as history, not the current total, and are already accurate. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…d of dropping it `value if isinstance(value, str) ... else None` silently converted EVERY non-string present value to absence: a malformed `transition.act: 123` or `destination_kind: 42` loaded as if the field had been omitted, which is indistinguishable from a legitimate None to every cross-axis check that reads it (`kind_declaring()`, `destination_role_status()`, and `load()`'s own referential-integrity checks below), letting the malformed value bypass validation entirely rather than being refused. `_opt_text(mapping, key, where)` now returns None only for an absent key or an explicit null; any other present value is routed through `_text()`, which already refuses a non-string (or empty-after-strip) value by name for every REQUIRED field in this module — the same promise, extended to the optional ones. All eighteen call sites now pass their local `where` so the refusal names the field. Verified against the fixture profile: `transition.act = 123` and `transition.destination_kind = 42` now raise DomainProfileInvalid naming the field, while a genuinely omitted `act` key still loads as None. 122 local tests (test_leg_shape, test_dependency_direction, test_domain_profile, test_no_hardcoded_status_words) pass unchanged. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ormed one
`data.get("gates") or []` treated ANY falsey present value the same as
a missing key: `gates: false`, `gates: 0`, `gates: ""` all silently
became `[]`, exactly like an omitted `gates` key does, because `gates`
is the one axis the loader's own comment already documents as legally
absent. That let a malformed declaration load as "no gates were
declared", which then also skipped the act.gate cross-axis check
below (guarded by `if declared_gates`), silently letting an arbitrary
`act.gate` value through validation.
Added `_opt_sequence(mapping, key, where)`, next to `_as_sequence`:
returns `[]` only for an absent key or an explicit null, and otherwise
requires the present value to actually be a list — but, unlike
`_as_sequence`, does NOT refuse a present-but-empty list, since for
this one optional axis "no entries" and "key absent" are the same
declaration. `gates=` in `load()` now calls it instead of the `or []`
idiom.
Verified against the fixture profile: `gates: false`, `gates: 0`, and
`gates: ""` now all raise DomainProfileInvalid naming `gates`, while an
explicit `gates: []` and a deleted `gates` key both still load exactly
as before (matching
tests/test_domain_profile.py::test_gate_reference_is_not_checked_when_the_profile_declares_no_gates).
122 local tests pass unchanged.
Lane: openxfactory-4-opendox-extraction
Refs opensoft/openXfactory#656
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… refuse a duplicate id The four `declared_*` set comprehensions each collapse a duplicate id with no error, and `act()`/`authority()` return the FIRST matching entry. A profile could therefore declare two entries with the same id but different metadata for any of these four axes and load cleanly: the cross-axis referential-integrity checks just below would validate against whichever entry happened to load, and every later `profile.act(...)`/`profile.authority(...)` lookup would silently return the first one and ignore the second — order-dependent behavior a malformed profile should never produce. `artifact_kinds` and each kind's `vocabulary` (both above, already landed) refuse a duplicate id the same way; this closes the same gap for the remaining four axes with one loop, immediately before the `declared_authorities`/`declared_acts`/`declared_evidence`/ `declared_gates` sets are built. Verified against the fixture profile: appending a duplicate entry to `acts`, `gates`, `evidence_classes`, or `authorities` now raises DomainProfileInvalid naming the axis and the repeated id in each case; the unmodified fixture still loads. 122 local tests pass unchanged. Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
There was a problem hiding this comment.
🟡 Changes recommended
One critical and seven moderate findings remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (7)
Previously missed (1) — in code that hasn't changed since the last review.
tests/test_no_hardcoded_status_words.py:241
- This companion guard only checks whether the raw source contains the text
domain_profile. Both engine modules already contain that name in comments/docstrings, so deleting the actual import and every runtime profile lookup would still pass and the parameterization could regress silently. Check the AST for an actual profile call/reference instead of searching source text.
src/openxdox/domain_profile.py:939
- This missing-field diagnostic says
gatesis one of the required axes and that none is optional, butREQUIRED_TOP_LEVELomitsgatesand_opt_sequence()deliberately accepts an absent gates axis. A profile missing another required field is therefore told to add an optional field; describe the five required fields and state thatgatesis optional.
raise DomainProfileInvalid(
f"{where}: required field(s) {missing} missing. A domain profile "
"declares all five axes of `domain-mapping-declaration` — artifact "
"kinds, lifecycle, acts and gates, evidence classes, promoting "
"authorities — plus its truth store; none of them is optional.")
src/openxdox/domain_profile.py:1155
- The Q5 delegation turns every exception raised by
opendox.domain_profile.current()into localDomainProfileNotRegistered. A registered upstream profile that is malformed, or an upstream import/runtime failure, will therefore be misreported as “nothing is registered” and hide the actionable error. Treat only the documented not-registered condition as absence and let other failures propagate.
try:
candidate = getter()
except Exception: # noqa: BLE001 — an upstream refusal is "not here"
return None
return candidate if isinstance(candidate, DomainProfile) else None
src/openxdox/gate_console.py:2380
- Removing these globals breaks
from openxdox.gate_console import *: this module has no__all__, so star imports enumeratemodule.__dict__, and PEP 562__getattr__/__dir__do not makeDRAFT_STATUSorSTAGED_STATUSappear there. That contradicts the stated backward compatibility for the previously public constants; add an explicit__all__containing the existing public globals plus both late attributes (or another star-import compatibility mechanism).
def __getattr__(name: str):
resolver = _LATE_ATTRIBUTES.get(name)
if resolver is None:
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
return resolver()
def __dir__() -> list[str]:
return sorted(list(globals()) + list(_LATE_ATTRIBUTES))
tests/test_no_hardcoded_status_words.py:89
_f_string_offendersexempts eachJoinedStrby line, but current source has additional prose nodes atgate_console.py:320(record's provenance),:1067(returned draft proposals),:1678(draft ideas/draft-proposal), and:1854(ratified state). The set lists:319,:1066,:1675, and:1851instead for several of these, so the required validate command reports existing prose as offenders; exempt the actual audited nodes.
("gate_console.py", 1066), # "'Returned drafts' record" / "returned draft proposals" — README/INDEX prose
("gate_console.py", 1675), # "draft workspace" / "draft ideas" / "draft-proposal convention" — prose
("gate_console.py", 1848), # ".ratification-record.yaml" — a filename, not a written status
("gate_console.py", 1851), # "the ratified state" — prose
})
tests/test_no_hardcoded_status_words.py:125
- The literal guard only matches a Constant whose entire value is one watched word, while the second pass only visits JoinedStr nodes. A normal string containing a status word (including an adjacent-literal concatenation) becomes a non-exact ast.Constant and passes both tests even though it can write a domain status. Scan all string-literal forms with the standalone-token rule, while retaining audited prose exclusions, so the required guard cannot be bypassed outside f-strings.
found = [
(node.lineno, node.value)
for node in ast.walk(tree)
if isinstance(node, ast.Constant)
and isinstance(node.value, str)
and node.value in WATCHED_WORDS
and id(node) not in keys
]
tests/test_no_hardcoded_status_words.py:89
PROSE_EXEMPTis keyed only by(module, lineno). Inserting or removing code above one of these f-strings shifts the line numbers; the original prose then becomes a false positive, and a new f-string that lands on an exempt line can be silently skipped, allowing a hardcoded status through the required guard. Key each exemption to the expected source segment or AST shape and assert that the exempt node still matches before excluding it.
PROSE_EXEMPT: frozenset[tuple[str, int]] = frozenset({
("gate_console.py", 315), # "the record's provenance names one of" (OutputBoundary refusal prose)
("gate_console.py", 319), # the same sentence's other raise site
("gate_console.py", 829), # "gate-action record " — the audit-record noun, not a status
("gate_console.py", 1066), # "'Returned drafts' record" / "returned draft proposals" — README/INDEX prose
("gate_console.py", 1675), # "draft workspace" / "draft ideas" / "draft-proposal convention" — prose
("gate_console.py", 1848), # ".ratification-record.yaml" — a filename, not a written status
("gate_console.py", 1851), # "the ratified state" — prose
})
- Files reviewed: 9/9 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 6 days and 5 hours by commenting @sourcery-ai review. Upgrade to get a review now.
…egistered DomainProfile, not doc_health's TAXONOMY (RULING C2; § 4.4 follow-up) (#16) Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 § 4.4 follow-up on RULING C2 (register item from #14's landing, #656 comment 5640381252): generator.py's exclusion check read its status vocabulary from a module-level LIFECYCLE_STATUSES = TAXONOMY imported from doc_health — a hardcoded status source and part of the declared doc_health cross-column reach. _document_exclusion_reason now reads the registered DomainProfile (profile.statuses for the kind that declares the demote act, the same kind-derivation idiom the module already uses), refusing with DomainProfileNotRegistered when nothing is registered — refusal, not a default. Four tests: every declared status accepted, an undeclared one rejected, refusal before registration, and a renamed status word needing no engine change. The AST literal guard and the doc_health reach table are unmoved (a name-to-name assignment was never a counted literal; the module still imports doc_health.corpus for corpus scanning, which stays a register item). Copilot's one thread — the pinned snapshot schema's lifecycle_status enum still mirrors doc_health's taxonomy — verified as no live regression (today's profile vocabulary equals the enum byte for byte) and recorded as a BUILD-arc register item under openXdox-spec's governance. CI's four-file validate: 122 passed at e23aa1a. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…bytes as package data, the assembly seam (#18) Lane: openxfactory-4-opendox-extraction Refs opensoft/openXfactory#656 (stays OPEN). CLAIM: 5648073924. **§ 3.4 slice S5, leg A — the gate loop leaves openDox's bundle and becomes a contribution openXdox supplies.** openDox-spec `docs/front-end-package-boundary.md` § 5 row S5 @ `7d12428c`; the contract is openXdox-spec `docs/gate-loop-view-contract.md` @ `d73767b7`, whose § 8 Q1–Q12 were RULED by Brett Heap on 2026-09-12 at opensoft/openXfactory#656 — comments `5648044785` (Q5, Q1, Q3), `5648049748` (Q2, Q4, Q7, Q8), `5648065587` (Q9–Q12), with the counterpart-Q6 correction at `5649094228`. SIX ViewBindings, not four: `gate.js:mountGateBar`, `gate-lens.js:mountLensGate`, `gate-projects.js:mountProjectCommissions`, `dispose.js:mountRefusalPanel`, `swb-create.js:mountCreateAffordance` and `swb-session.js:mountSessionAffordances` — slice S4's two new class-B modules say in their own headers that they leave the bundle here, and leaving them would have left their `gate.lens` / `gate.projects` entries in openDox's CORE arm. Every binding names a **`shell`** region, so RULED Q1's generic `dom` mount pass never reaches them; RULED Q3's ONE signature `mount(host, snapshot, ctx)` is applied to all six and **the gate bar's declared exception ends here**; RULED Q2's `exports` namespace names `isGateBearing` and `firstEditTransport`; RULED Q4's `requires` are dotted `/capabilities` paths, argued per binding; RULED Q8 makes `page-overlay` the declared page-level host, so no `document.body` survives in `dispose.js`; RULED Q12's four computed routes are declared as their LITERALS. Seventeen routes in all — § 1.2(c)'s thirteen constants plus Q12's four — every one under this column's own `serve_gate.ACTIONS_GATE_PREFIX`. RULED Q5's assembly seam: `openxdox.web_assets.install_view_modules(web_dir)` copies the six modules into the one `<web_dir>/views/` that `opendox.serve.build_server` serves, shipped as `[tool.setuptools.package-data]`, with `serve_views.ViewModuleRoutesExtension` as the fallback. It REFUSES rather than creating a `web_dir` or a `views/` that is not there — a bundle with no openDox in it is an assembly error, not a partial install to continue past. **Pairs with opensoft/openDox-code#20** (the shell half). Neither leg lands alone: the shell stops shipping these six modules in the same act that this column starts shipping them. **The annotation this leg was owed has LANDED FIRST, as RULING Q-L1 requires:** opensoft/openXfactory#1023 → `ee251d6c54b7e16728f2648c71faa90d6be76496`, carrying the FOUR RE-DESTINATIONS under the form RULED Q6 (`gate.js`, `dispose.js`, `swb-create.js`, `swb-session.js` from `opendox_code` to `openxdox_code`, each row's own `destination` untouched), the seven `created:` admissions this column needed, and sixteen declared-edit entries over eleven rows. Measured from that landed main against this head: `verify-carve-arrival.py --destination openxdox_code --phase B` answers **OK — 96 rows arrived, 9 digests verified, 83 declared-edit rows within their lines, 123 files with NONE undeclared, 4 rows RE-DESTINED HERE (RULED Q6), 22 declared admissions used** — once the three PRE-EXISTING `arrival-undeclared-edit` rows that predate this slice (`gate_console.py`, `generator.py`, `tests/ideation-dashboard/ test_generator.py`, openXdox-code #14's § 4.4 code half and #16's RULING-C2 follow-up) are remedied in a SCRATCH manifest, never the repository's. They are listed, not absorbed, and they still owe an annotation of their own. Register, carried forward rather than passed over: * **The `opendox` pin bump is owed.** This leg pins `opendox @ a99eba03`, which predates the view registry, so the three materialization assertions SKIP — never fail — until the pin names an openDox carrying § 3.4 slice S5. * **`profile_openxfactory.py` owes one line** at openxFactory: `VIEW_EXTENSIONS = view_extensions.VIEW_EXTENSIONS` beside its `ROUTE_EXTENSIONS` tuple. The assembly's act, not this leg's. * **The gate column's transport-failure handling is a defect this slice cannot take.** Copilot found, correctly, that a rejected `fetch` escapes the write path in four of the six modules; four of those are ARRIVED files whose flagged lines are byte-identical to the carve commit, and normalizing a rejection into `{ok: false, message}` is new BEHAVIOUR, which is in none of RULING OQ-1's three declared-edit classes. RULED BY THE LANE, 2026-09-13: out of S5's scope. Five threads resolved on that word and REGISTERED on #656 for a later declared act. * **RULED Q7's CSS extraction is owed** for the same reason: "a stylesheet block leaves for another leg" is in none of OQ-1's three classes. Copilot rounds 1–3, all fifteen threads answered and resolved. The sharpest finding was its own correction of this PR's first shape: `gate.dispose` declared `requires: ["actions.gate"]`, which made `resolveView` answer `null` on every HOSTED intent plane and deleted the refusal tray the declaration was meant to describe — fixed at `2ca488a` with a test that states the reason. Round 3 took two more: a built `firstEditTransport` now keeps the model it validated instead of reading the module-level install (it is the one export reached through the REGISTRY rather than a mount, so it outlives the call that built it, and a second mount would have shaped one editor's Save with another's model), and `tests/test_gate_console.py`'s three expectations were repointed to `src/opendox/cli.py` — lines the carve row already declares at `[58, 1627, 1785, 1786]`, so no new declaration was owed. Gate evidence: destination gate above; `validate` SUCCESS at `7b86350a` (run 34727512041), the one required check; 15 review threads / 0 unresolved; Sourcery review skipped (budget) = advisory.



Lane: openxfactory-4-opendox-extraction (formerly openxfactory-opendox)
#13 landed on main as 01357c8 (the BUILD slice 2b ratchet), per the sequencing note on
openxFactory#656(comment5634218589). It shared no file with #13 — #13 touchedpyproject.tomlandtests/test_dependency_direction.py, neither of which this PR edits — which is why it was authored before #13 landed and lands after.What this is
§ 4.4 of
split-opendox-two-layer-product, the code half at openXdox-code: the lifecycle engine stops carrying one domain's words and reads its status vocabulary, terminal statuses and immutability point from a registered domain profile.RULING C2 (
openxFactory#656, 2026-09-04T17:47Z) is that openXdox is the domain-mapping CORE, parameterized by a profile a descendant supplies — "a clinician usingMedxDoxnever sees the word 'requirement'". It was not: openxFactory's ownStatus:taxonomy lived as literals inside the domain-neutralopenxdoxpackage, which is verbatim the failuredomain-mapping-declarationnames ("openxFactory's own vocabulary is treated as neutral … the placement is refused under RULING C2").Citations. RULING C2 (
5547049745-adjacent packet text,openspec/changes/split-opendox-two-layer-product/tasks.md§ 4.4 /design.md/specs/domain-mapping-declaration/spec.md); ASK-25628886636(the lazy proxy, and the sequencing); ASK-45633855878(the questions) RULED at5634195861("ASK-4: recommendations on all five, proceed"); the sequencing note5634218589; this lane's CLAIM5634255209. Design note and schema:opensoft/openXdox-specdocs/domain-profile-design-note.md+contracts/schemas/domain-profile.schema.yaml(#8,446a13f5).The RULED shape, and where each ruling lands
DomainProfile+load(path_or_mapping)load()checks the fields the ENGINE consumes and refuses naming the fieldrequire_status()/is_immutable()enforce;Transition.authorityis parsed, typed and unreadterminal_statusesDomainProfile.terminal_statuses(kind)register()once at process start;current()here,profile_openxfactoryat openDox-code (§ 4.3, held)Resolve by ROLE, never by word.
STAGED_STATUSwas never "the stringstaged" — it is "the status this domain's documents carry while ORGANIZED". The profile declares a neutralrole:per status, and the engine asksprofile.status("organized"). A descendant whose organized status is spelledtriagedworks with no engine change. Ambiguity is refused naming both candidates, never resolved by declaration order.Refusal, not a default. With nothing registered,
current()raisesDomainProfileNotRegisteredquoting the registration call. There is no fallback to the words this package used to hardcode — that fallback is exactly how these literals would have survived § 4.4 invisibly, and it is the permissive answerdomain-mapping-declarationrefuses twice.The registration contract the openxFactory half must honour
openxdox.domain_profile(src/openxdox/domain_profile.py).register(load(<path>)), ONCE, at process start, by the descendant's own adapter and by nothing in the neutral packages.openxdoxnever importsopenxFactory; the direction the carve removed stays removed.DomainProfileNotRegistered:demotetransition (itsto:is the status the engine flips returning outlines to, and thekind:token every transition manifest and declared-origin record carries; its declaring kind'sproposedstatus is what returning change artifacts are flipped to), and a kind declaring thepromote-to-stagingact whoseterminal_statusesare the states a candidate may not be promoted from. A profile missing either makes the corresponding verb raiseProfileLookupError— a reportable gap in the declaration, named, rather than a silent wrong answer. The vendored fixture carries both, and its header says so.current()also consultsopendox.domain_profilewhen this leg's registry is empty — late, optional, and only in the lawful direction (openXdox pins openDox, RULED OQ-2) — so the one host registration Q5 rules can serve both legs once § 4.3'sprofile_openxfactoryproxy lands. A delegation, never a default: with neither registry holding a profile the refusal stands.gate_console.STAGED_STATUS/.DRAFT_STATUSsurvive as module attributes via PEP 562__getattr__, resolved on first ACCESS, so an importer that never drives the lifecycle never needs a profile.The seventeen sites, re-swept live on
main5333b125Seventeen occurrences over fifteen lines — the design note's count, verified by re-sweep in this branch and asserted by
tests/test_no_hardcoded_status_words.py.gate_console.py:167DRAFT_STATUS = "draft"_draft_status()→current().status("proposed")(module attr kept via__getattr__)gate_console.py:171STAGED_STATUS = "staged"_staged_status()→current().status("organized")(module attr kept via__getattr__)gate_console.py:826DRAFT_STATUS_draft_status()gate_console.py:903STAGED_STATUS_staged_status()gate_console.py:968"kind": "staged"_demote_destination()→current().destination_status("demote")gate_console.py:1012DRAFT_STATUS_draft_status()gate_console.py:1151("rejected", …)current().terminal_statuses("register-possible")gate_console.py:1151(…, "superseded")gate_console.py:1339DRAFT_STATUS(first)_draft_status()gate_console.py:1339DRAFT_STATUS(second)_draft_status()gate_console.py:1351STAGED_STATUS_staged_status()gate_console.py:1374STAGED_STATUS_staged_status()gate_console.py:1487DRAFT_STATUS_draft_status()gate_console.py:1569DRAFT_STATUS_draft_status()gate_console.py:1651"kind": "staged"_demote_destination()generator.py:349!= "staged"_declared_origin_kind()→current().destination_status("demote")generator.py:367return "staged", …_declared_origin_kind()gate_console.py:1550f"# {topic}\n\nStatus: staged\n"_staged_status()FINDING: it is EIGHTEEN occurrences over SIXTEEN lines, not seventeen over fifteen
tests/test_no_hardcoded_status_words.pyfailed on its first run against a tree in which all seventeen named sites had already been migrated, atgate_console.py:1550onmain:— the README a demote writes for a staging topic that does not have one. The design note's live sweep looked for the bare token
"staged"and for the constantSTAGED_STATUS; here the word is embedded in a longer f-string, so neither pattern saw it. It is the same defect and it is migrated on the same accessor as the fragment beside it. The count for the record is eighteen occurrences over sixteen lines. This is the argument for a guard over a careful reading, in one line of evidence — and it is why the guard is in the required check rather than in a commit message.One disposition worth naming, because it departs from the design note's column heading. The note's migration table files sites 5/15/16/17 under the artifact kinds axis and calls site 5 "the destination kind of the
demotetransition". The token those four sites actually read and write isstaged— the demote transition's declaredto:status — while the profile'sdestination_kindfordemoteisstaging-topic, the artifact kind. Readingdestination_kindthere would have changed the bytes in every transition manifest, declared-origin record and execution receipt in the corpus. So the engine readsdestination_status("demote")(→staged, byte-identical), anddestination_kind("demote")(→staging-topic) is carried on the profile as declared data for the later slice that enforces transitions. Nothing from the note is dropped; the axis it named is on the object, and the site reads the field that preserves behaviour.By role, by act — never by a name this package writes down. A status is asked for by neutral ROLE; a KIND is asked for through the ACT that operates on it (
kind_declaring("demote"),kind_declaring("promote-to-staging")) rather than by writinggovernance-documentorregister-possibleinto a neutral module, because a descendant calls its governed prose and its candidate register something else. What the engine keeps is its OWN verb list —demoteandpromote-to-stagingare the gate console's API surface, not status words.test_the_engine_names_no_artifact_kind_of_any_domainguards that too.Disclosed, and deliberately not migrated: two register words remain.
_PROMOTABLE_STATE = "latent"(gate_console.py:1135) andstate == "picked"(:1154) are the possibles register's own vocabulary. ASK-4 Q4 ruled the TERMINAL pair intoterminal_statusesand scoped nothing else, and the fixture'sregister-possiblelifecycle declares both words with neutral roles, so migrating them is a one-line follow-on whenever the register's vocabulary slice is taken. They are named here rather than swept in silently, and they are outside the nine-word taxonomy this PR's guard asserts is gone.Tests
validatenow runs the two new suites beside the existing shape assertions, on exactly the groundstest_dependency_direction.pyjoined under § 4.1: both are shape assertions authored HERE, not carved suites. The guard PARSES the two engine modules withastand never imports them; the profile suite importsopenxdox.domain_profilealone —yamland the standard library, nodoc_health, no carved module. Neither un-narrows RULED Q-L8 (b′).tests/test_no_hardcoded_status_words.py— the C2 guard. Zero literals of the nine-word taxonomy (plus the register'srejected) survive in either module, dict KEYS excluded ({"record": …}is a field name, not a status claim) and f-string parts included — which is what found site 18. It also asserts each module still reads the profile (a module that neither hardcodes a word nor reads a profile has not been parameterized, it has been emptied), that nothing resolves a profile at MODULE level, and that no artifact KIND of any domain is named either.tests/test_domain_profile.py— the loader (every required field refused BY NAME; referential integrity ofimmutability_point.status,transitions.from/toandterminal_statusesagainst the declared vocabulary; forward tolerance of fields a later schema revision adds), role resolution and its ambiguity refusal, a descendant spelling its organized statustriagedresolving with no engine change, per-kindterminal_statuses, the immutability point including the never-freezingregeneratedcase and its required reason, and registration / late resolution / the refusal — asserting the refusal message leaks no domain word, and asserting in a FRESH interpreter that import registers nothing.conftest.pyat the repository root makes the HOST's registration at test-process start, unconditionally and never behind a try/except: a suite that silently ran with no profile is a suite in which this slice's refusal looks like a passing test. Process start is where a host registers, and this is it.tests/test_leg_shape.pyandtests/test_dependency_direction.pyare untouched — the two files openXdox-code Lower the openDox back-import ratchet to ZERO at import time after BUILD slice 2b, and guard the values openDox now owns #13 owns arepyproject.tomlandtests/test_dependency_direction.py, and neither is edited here. No back-import is added:domain_profile.pyimportsyaml(a declared runtime dependency, already onIMPORT_TIME_ALLOWED) and stdlib only.Figures.
validate's own command —python -m pytest -q tests/test_leg_shape.py tests/test_dependency_direction.py tests/test_domain_profile.py tests/test_no_hardcoded_status_words.py --noconftest— 83 passed locally: the 24 that pass onmain, unchanged, plus 59 new (49 profile + 10 guard). The carved suites undertests/remain uncollectable in this leg for the pre-existing reasonsvalidate.ymlrecords (RULED Q-L8 (b′)):doc_healthandscripts/proposal-support.pyare openxFactory's, unvendored and not on PyPI. Their collection errors are identical onmainand on this branch.Not in this PR
openxFactory#940and follows it. This half ships the contract, the refusal and the accessors; it ships no domain's words.cli.py/serve.py) — shares files with BUILD slice 2b and stays held.Refs opensoft/openXfactory#656.
🤖 Generated with Claude Code
Summary by Sourcery
Parameterize the lifecycle engine with a registered domain profile and enforce refusal of hardcoded or undeclared domain vocabulary.
New Features:
Bug Fixes:
Enhancements:
CI:
Tests: