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---
25 lines
766 B
Python
25 lines
766 B
Python
"""nova env-check — check that an environment is bound (REQ-181)."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import sys
|
|
|
|
from core.environment_check import check
|
|
|
|
|
|
def add_parser(subparsers):
|
|
p = subparsers.add_parser("env-check", help="check that an environment is bound")
|
|
p.add_argument("contract", nargs="?", default=None, help="contract path")
|
|
p.add_argument("--env", default=None, help="environment name override")
|
|
p.set_defaults(_run=run)
|
|
|
|
|
|
def run(args) -> int:
|
|
ok, message = check(contract_path=args.contract, env_name=args.env)
|
|
print(message) if ok else sys.stderr.write(message + "\n")
|
|
return 0 if ok else 1
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import sys
|
|
print("use: nova env-check <contract.yml> [--env name]", file=sys.stderr) |