2ed2b3ae0f
One nova/<name>.py per user-facing core/ module. Each ≤50 lines, ≤3 FunctionDef (add_parser + run [+1 helper]), every user-function call resolves to a core.* import, no `if` statements except `if __name__`. Subcommands: - nova resolve → core.contract_resolver.resolve - nova decommission → core.decommission_transform.decommission_transform - nova env-transition detect|record → core.env_transition - nova env-check → core.environment_check.check - nova hitl → core.hitl_gates.attest (+ approver_from_env) - nova onboard → core.onboarding.generate_env_file - nova outbox → core.outbox_writer.write_event - nova publish-outputs → core.output_publisher.publish_to_ssm + format_comment - nova policy → core.policy_engine.get_engine + get_policy_root (status) - nova regression → core.regression_verify.run_regression + write_report - nova sod → core.separation_of_duties.check - nova readiness → core.submission_readiness.cli_main - nova attestation-matrix → core.attestation_matrix.cli_main (new thin wrapper) - nova confidence → core.confidence_signal.cli_main (new thin wrapper) core wrappers added (minimal): attestation_matrix.cli_main, confidence_signal.cli_main — extracted from their __main__ blocks so the nova subcommands stay thin. ---ci--- project: acdl phase: 1 milestone: v1.28 status: execute persona: cli-engineer ---/ci---
26 lines
707 B
Python
26 lines
707 B
Python
"""nova outbox — write an evidence event to the DynamoDB outbox (D-P10-3)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
|
|
from core.outbox_writer import write_event
|
|
|
|
|
|
def add_parser(subparsers):
|
|
p = subparsers.add_parser("outbox", help="write an evidence event to the outbox")
|
|
p.add_argument("event_json", help="path to an event JSON file")
|
|
p.set_defaults(_run=run)
|
|
|
|
|
|
def run(args) -> int:
|
|
with open(args.event_json) as fh:
|
|
event = json.load(fh)
|
|
item = write_event(event)
|
|
print(json.dumps({k: list(v.values())[0] for k, v in item.items()}, indent=2))
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import sys
|
|
print("use: nova outbox <event.json>", file=sys.stderr) |