Skip to content

Add process-local-inbox transport outbox flag and local outbox persistence/load helpers - #56

Closed
Exohayvan wants to merge 3 commits into
mainfrom
ai/next-step-20260630-090725
Closed

Exohayvan wants to merge 3 commits into
mainfrom
ai/next-step-20260630-090725

Conversation

@Exohayvan

Copy link
Copy Markdown
Contributor

Objective

Add a dedicated local transport outbox path for worker-emitted messages during process-local-inbox runs, so a node can publish results as a transport artifact without changing existing replay/audit log semantics. This closes a small communication gap in the local prototype and keeps the change scoped to the current transport seam.

What changed

  • Added local transport outbox support in local_transport.py:
    • Introduced versioned outbox document handling and pathing under outboxes/<node-id>.json.
    • Added helpers to write and load outboxes with deterministic ordering, URL-safe quoted filenames, and strict validation.
    • Enforced sender ownership (sender_node_id == node_id), duplicate message_id rejection, and strict version/schema checks.
  • Extended process-local-inbox CLI behavior in cli.py:
    • Added --write-transport-outbox flag.
    • Required the flag to be used only with --transport-dir.
    • Reused existing emitted-message extraction and wrote invocation-specific emitted messages to the new outbox.
    • Added response fields transport_outbox_path and transport_outbox_message_count when enabled.
    • Kept --output-message-log-path replay/audit behavior unchanged.
  • Updated tests:
    • tests/test_local_transport.py: added outbox path, happy-path load/write, and failure-path validation coverage.
    • tests/test_cli_transport.py: added end-to-end transport outbox write path, payload assertions, invalid flag-combination check, and malformed-input no-overwrite behavior.
    • tests/test_cli.py: parser/build/arg contract updates for the new CLI flag.
  • Updated README.md usage documentation to include the new workflow and to distinguish transport outbox output from output-message replay logs.

Validation

  • Ran full test suite from repository root:
    • PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python -m unittest discover -s tests -v
  • Result: 311 tests passed.
  • Validation detail is based on this run’s concrete command output in this workspace.

Safety notes

  • No force push used.
  • No hard reset used.
  • Local automation paths are not published in this PR body.

@Exohayvan
Exohayvan force-pushed the ai/next-step-20260630-090725 branch from 4a1727f to 9d96810 Compare June 30, 2026 15:51
@Exohayvan

Copy link
Copy Markdown
Contributor Author

Closing during PR cleanup: this is superseded by #57, which keeps the same outbox direction and includes stronger source/processed-count metadata.

@Exohayvan Exohayvan closed this Jun 30, 2026
@Exohayvan
Exohayvan deleted the ai/next-step-20260630-090725 branch June 30, 2026 16:10
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.

1 participant