fix+feat: repair agent-term red main — complete the half-merged config/pipeline/office/matrix/registry features (24→0)#91
Merged
Conversation
… schema + propagate admitted decision
Main was red (24 failing). Two root causes, both half-merged features whose
code+tests landed without the supporting schema/wiring:
1. config.py: health.py and the *_service builders read
config.policy_fabric.{repository,fixture_path,endpoint_url,token_env,timeout_seconds}
and config.agent_registration.{fixture_path,endpoint_url,token_env,timeout_seconds},
none of which existed -> AttributeError across health/registry/policy tests.
Added the missing fields + a PolicyFabricConfig dataclass, parsed from the
camelCase JSON keys (policyFabric.fixturePath, agentRegistration.fixturePath, ...).
2. pipeline.py: the policy gate admitted an event but the domain adapters
(memory-mesh, cloudshell-fog, workspace) require a policy_decision_ref that was
never propagated onto the event -> missing_policy_decision denials. Enrich the
dispatch event with the admitted decision id before the domain adapter runs.
Result: 24 -> 8 failing, +16 tests, no regressions. The remaining 8 are separate
UNIMPLEMENTED features (the 'office' CLI subcommand exists in no branch;
dispatch_cli does not wire the file-backed policy fabric) -> follow-up.
… fully green (24->0) Builds on the config/pipeline fix. Implements the pieces whose tests had landed without code: - office CLI subcommand (create-deck / inspect / convert) recording governed prophet-workspace office_artifact_request events (test_office_cli). - dispatch_cli now treats a config-declared Policy Fabric (file/HTTP) and Agent Registry (file/HTTP) as authoritative, with the CLI-flag/local-runtime backends as fallback (test_dispatch_policy_fabric_service, operator_smoke github grant). - matrix_service_send + office_artifact_request are side-effecting kinds so the policy gate admits+records them (test_matrix_cli persisted_events order). - matrix_cli --state / --save-state wiring + room-alias resolution via the existing matrix_state module (operator_smoke matrix steps). Full suite: 188 passed, 0 failed.
CI runs 'ruff check .' before pytest; these ambiguous-name (l) and unused-var (json_mode) lints predate this PR but block the check. Renamed to 'lease' and dropped the dead assignment. ruff clean; 188 tests still pass.
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.
agent-term's
mainwas red — 24 failing tests from several features whose code+tests landed without their supporting schema/wiring. This PR completes them; full suite now 188 passed, 0 failed.Fixes
config.py): addedPolicyFabricConfig+ the missingagent_registrationfields (fixture_path/endpoint_url/token_env/timeout_seconds) thathealth.pyand the service builders required → killed theAttributeErrorcascade.pipeline.py): the policy gate admitted events but never put thepolicy_decision_refon the event, so domain adapters denied everythingmissing_policy_decision. Now propagated.officeCLI command (cli.py):create-deck / inspect / convertrecording governedoffice_artifact_requestevents — the subcommand the tests referenced existed in no branch.dispatch_cli.py): a config-declared Policy Fabric and Agent Registry (file- or HTTP-backed) are now used, with the CLI-flag/local-runtime backends as fallback.policy_fabric.py):matrix_service_send+office_artifact_requestnow trigger admission.matrix_cli.py): wired--state/--save-state+ room-alias resolution via the existingmatrix_statemodule.Two commits: (1) config+pipeline root causes, (2) the remaining feature completions. Zero regressions at each step (24→15→9→8→5→3→2→0).