Skip to content

Widen sociosphere-bridge to carry CHRONOS carrier objects (additive) - #330

Merged
mdheller merged 2 commits into
mainfrom
feat/chronos-carrier-bridge-superset
Aug 2, 2026
Merged

Widen sociosphere-bridge to carry CHRONOS carrier objects (additive)#330
mdheller merged 2 commits into
mainfrom
feat/chronos-carrier-bridge-superset

Conversation

@mdheller

@mdheller mdheller commented Aug 2, 2026

Copy link
Copy Markdown
Member

Summary

Closes the gap tracked in #329: extends the existing sociosphere-bridge seam
(docs/sociosphere-bridge.md + scripts/validate_bundle.py +
scripts/emit_run_artifact.py + scripts/emit_replay_artifact.py) so it can
also carry CHRONOS neuro-symbolic carrier objects, per Michael's "take the
superset, subsume the capability, meld it into the estate" instruction: same
bridge, a wider set of carried-object types, not a second parallel bridge.

What I verified vs. what issue #329 claimed: the issue's description of
the bridge is accurate. docs/sociosphere-bridge.md documents the seam, and
the real implementation lives in scripts/validate_bundle.py (fail-closed
gate → ValidationArtifact) and scripts/emit_run_artifact.py /
scripts/emit_replay_artifact.py (permissive projectors → RunArtifact /
ReplayArtifact). None of those three scripts had any CHRONOS-carrier
awareness before this change — confirmed by grepping for the field names and
by the tests below.

What changed (additive only)

  • scripts/validate_bundle.py: new validate_chronos_carrier(spec), a
    fail-closed structural gate mirroring the existing
    validate_sourceos_image_production() pattern. An optional
    spec.chronosCarrier block (sourceEvidenceRef, methodFamily,
    claimStatus, validationStatus, nonAuthorityDeclaration, owningPlane,
    replayRef) is rejected at the bridge if incomplete, if
    nonAuthorityDeclaration isn't true, or if owningPlane is agentplane
    — agentplane never claims canonical authority over a carrier it merely
    carries.
  • scripts/emit_run_artifact.py / scripts/emit_replay_artifact.py: new
    extract_chronos_carrier(spec), a permissive projector (mirrors
    extract_sourceos_image_production()) that folds whatever carrier fields
    were declared into RunArtifact.chronosCarrier /
    ReplayArtifact.inputs.chronosCarrier.
  • schemas/bundle.schema.v0.1.json, schemas/run-artifact.schema.v0.1.json,
    schemas/replay-artifact.schema.v0.1.json: document the new optional
    field (open schemas — additive, no breaking changes).
  • docs/sociosphere-bridge.md: new "CHRONOS carrier passthrough (additive)"
    section describing the extension and its non-authority stance.
  • Makefile: new validate-chronos-carrier-bridge target, wired into the
    existing validate aggregate target (following this repo's incremental
    validate: <target> append convention).
  • .github/workflows/run-replay-artifacts.yml: extended to also emit
    run/replay artifacts against a new CHRONOS-carrier-bearing fixture bundle
    and assert the projected fields, plus run the bridge's unit tests.

Proof it's additive (superset check)

  • tests/test_chronos_carrier_bridge.py::SupersetTests builds a spec with
    both a SourceOS binding and a CHRONOS carrier declared, and asserts the
    pre-existing SourceOS projection (extract_sourceos_bindings) is byte-for-
    byte unchanged while the new CHRONOS projection is present alongside it.
  • examples/run-replay/minimal-bundle.json (the pre-existing fixture, no
    chronosCarrier) still emits chronosCarrier: {} unchanged.
  • tests/test_sourceos_binding_projection.py (pre-existing test file) passes
    unmodified.

Test coverage added

tests/test_chronos_carrier_bridge.py (20 tests):

  • gate tests: not-applicable when absent, pass + field projection when valid,
    rejection on each missing required field, rejection on
    nonAuthorityDeclaration=false (an improperly-authorized carrier), rejection
    on owningPlane=agentplane/AgentPlane (case-insensitive), rejection on a
    non-string methodFamily
  • emitter projection tests (permissive, don't fail closed — matching the
    existing extract_sourceos_image_production split between strict-gate and
    permissive-collector)
  • superset tests (above)
  • CLI-level subprocess tests against tests/fixtures/chronos-carrier/
    (valid.* / reject.*, following this repo's existing fixture-naming
    convention), including the two negative "improperly-authorized carrier"
    cases

Test results

python3 -m unittest tests.test_sourceos_binding_projection tests.test_chronos_carrier_bridge -v
Ran 20 tests in 0.11s — OK

python3 -m pytest -q tools/tests
323 passed

python3 -m pytest -q tests/ --deselect tests/test_local_control_node_process.py::test_process_local_control_node_input
54 passed  (the one deselected test fails identically on origin/main, pre-existing/unrelated)

make validate-chronos-carrier-bridge
OK

Also ran the full run-replay-artifacts CI job locally against both the
pre-existing and new fixture bundles — both emit valid JSON and the new
fixture's chronosCarrier projects correctly end-to-end through both
emit_run_artifact.py and emit_replay_artifact.py.

Non-goals (unchanged)

  • No taxonomy/schema authority over CHRONOS's methodFamily / claimStatus
    / validationStatus values — passthrough only.
  • No cryptographic attestation or full authority/delegation reconstruction
    claims (see docs/replay-boundary.md).
  • Agent-execution/action logic untouched — this is a bridge-surface
    extension only.

Refs #329, SocioProphet/socioprophet#498,
sociosphere/docs/integration/neurosymbolic-chronos-alignment.md.

Extends the existing sociosphere-bridge seam (validate_bundle.py,
emit_run_artifact.py, emit_replay_artifact.py) so it can also carry CHRONOS
neuro-symbolic carrier objects (source evidence ref, method family,
claim/validation status, non-authority declaration, owning plane, replay ref)
as a second carried-object type alongside its existing SourceOS/sociosphere
workspace artifact handling -- reusing the same Bundle-spec transport and
extraction-function pattern rather than building a parallel bridge.

- scripts/validate_bundle.py: add validate_chronos_carrier(), a fail-closed
  structural gate mirroring validate_sourceos_image_production(). Rejects a
  declared spec.chronosCarrier that is incomplete, that does not set
  nonAuthorityDeclaration=true, or that names agentplane as owningPlane.
- scripts/emit_run_artifact.py, scripts/emit_replay_artifact.py: add
  extract_chronos_carrier(), a permissive projector mirroring
  extract_sourceos_image_production(), so RunArtifact/ReplayArtifact carry
  whatever chronosCarrier fields were declared.
- schemas/bundle.schema.v0.1.json, schemas/run-artifact.schema.v0.1.json,
  schemas/replay-artifact.schema.v0.1.json: document the new optional field.
- docs/sociosphere-bridge.md: document the additive extension and its
  non-authority stance.
- tests/test_chronos_carrier_bridge.py + tests/fixtures/chronos-carrier/:
  gate/projection unit tests, a superset check proving the pre-existing
  SourceOS binding path is untouched, and CLI-level valid/reject fixture
  coverage for the negative cases (missing field, false non-authority
  declaration, owningPlane=agentplane).
- examples/run-replay/minimal-bundle-with-chronos-carrier.json +
  .github/workflows/run-replay-artifacts.yml: exercise the new carrier type
  end-to-end in the existing run-replay-artifacts CI job, and run the bridge
  unit tests there too.
- Makefile: new validate-chronos-carrier-bridge target wired into `validate`.

Refs #329.
Copilot AI review requested due to automatic review settings August 2, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR widens the existing sociosphere-bridge surface to optionally carry CHRONOS neuro-symbolic carrier objects end-to-end (bundle validation gate + run/replay artifact projection), as an additive extension aligned with issue #329.

Changes:

  • Add a fail-closed spec.chronosCarrier structural gate in scripts/validate_bundle.py, and permissive projection into RunArtifact / ReplayArtifact emitters.
  • Extend JSON schemas and bridge documentation to describe the new optional chronosCarrier passthrough fields.
  • Add fixtures + unit tests + workflow updates to verify projection and “superset” (SourceOS + CHRONOS) coexistence.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_chronos_carrier_bridge.py Adds unit + CLI fixture tests for CHRONOS carrier gate/projection and coexistence with SourceOS bindings.
tests/fixtures/chronos-carrier/valid.chronos-carrier-bundle.json Adds a valid bundle fixture carrying spec.chronosCarrier.
tests/fixtures/chronos-carrier/reject.chronos-carrier-bundle.owning-plane-agentplane.json Adds a rejecting fixture for owningPlane=agentplane.
tests/fixtures/chronos-carrier/reject.chronos-carrier-bundle.non-authority-declaration-false.json Adds a rejecting fixture for nonAuthorityDeclaration=false.
tests/fixtures/chronos-carrier/reject.chronos-carrier-bundle.missing-replay-ref.json Adds a rejecting fixture for missing replayRef.
scripts/validate_bundle.py Implements validate_chronos_carrier() and includes its output in the produced ValidationArtifact.
scripts/emit_run_artifact.py Adds permissive extract_chronos_carrier() projection into RunArtifact.chronosCarrier.
scripts/emit_replay_artifact.py Adds permissive extract_chronos_carrier() projection into ReplayArtifact.inputs.chronosCarrier.
schemas/run-artifact.schema.v0.1.json Documents optional chronosCarrier object in RunArtifact.
schemas/replay-artifact.schema.v0.1.json Documents optional chronosCarrier object in ReplayArtifact inputs.
schemas/bundle.schema.v0.1.json Documents optional spec.chronosCarrier object in Bundle schema.
Makefile Adds validate-chronos-carrier-bridge target and wires it into validate.
examples/run-replay/minimal-bundle-with-chronos-carrier.json Adds a run/replay example bundle carrying chronosCarrier.
docs/sociosphere-bridge.md Documents the new CHRONOS carrier passthrough lane and non-authority stance.
.github/workflows/run-replay-artifacts.yml Extends CI to test CHRONOS-carrier fixture emission and run new unit tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +67 to +74
python3 -c "
import json
run = json.load(open('/tmp/agentplane-run-replay-fixture-chronos-carrier/run-artifact.json'))
replay = json.load(open('/tmp/agentplane-run-replay-fixture-chronos-carrier/replay-artifact.json'))
assert run['chronosCarrier']['methodFamily'] == 'neurasp-adjudication', run
assert replay['inputs']['chronosCarrier']['methodFamily'] == 'neurasp-adjudication', replay
print('chronosCarrier passthrough OK')
"
Comment on lines 45 to +49
- name: Validate run and replay artifact schemas
run: |
python3 -m json.tool schemas/run-artifact.schema.v0.1.json >/dev/null
python3 -m json.tool schemas/replay-artifact.schema.v0.1.json >/dev/null
python3 -m py_compile scripts/emit_run_artifact.py scripts/emit_replay_artifact.py
python3 -m py_compile scripts/emit_run_artifact.py scripts/emit_replay_artifact.py scripts/validate_bundle.py


- Convert the inline python3 -c "..." block scalar to the repo's
  established python3 - <<'PY' heredoc convention (already used in
  ci.yml/lint.yml). The quoted -c string relied on every physical
  line sharing identical literal indentation so YAML's block-scalar
  stripping would land it flush-left; that held today but was one
  careless edit away from an IndentationError. The heredoc form is
  the same normalization mechanism the rest of the repo already uses
  and removes the fragility Copilot flagged.
- Add a python3 -m json.tool check for schemas/bundle.schema.v0.1.json
  in the schema-validation step, since this workflow is triggered by
  changes to that file but wasn't parsing it for syntax errors.
@mdheller
mdheller merged commit 97c3ea6 into main Aug 2, 2026
11 checks passed
@mdheller
mdheller deleted the feat/chronos-carrier-bridge-superset branch August 2, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants