新增市場情報候選佇列 writer preflight
All checks were successful
CD Pipeline / deploy (push) Successful in 1m1s

This commit is contained in:
OoO
2026-05-19 09:42:16 +08:00
parent abe3be2ffa
commit c0ba5e876a
12 changed files with 736 additions and 49 deletions

View File

@@ -24,6 +24,9 @@ with contextlib.redirect_stdout(sys.stderr):
APPROVAL_ENV_VAR,
build_candidate_queue_writer_cli_plan,
)
from services.market_intel.candidate_queue_writer_preflight import ( # noqa: E402
build_candidate_queue_writer_preflight,
)
def parse_args(argv=None):
@@ -50,6 +53,11 @@ def parse_args(argv=None):
default=None,
help=f"One-time approval token checked against {APPROVAL_ENV_VAR}.",
)
parser.add_argument(
"--read-only-preflight",
action="store_true",
help="Run read-only schema / payload preflight before returning the gate.",
)
return parser.parse_args(argv)
@@ -75,8 +83,13 @@ def main(argv=None):
sample_result=sample_result,
payload_error=payload_error,
)
writer_preflight = build_candidate_queue_writer_preflight(
transaction_preview=transaction_preview,
execute_requested=args.read_only_preflight,
)
plan = build_candidate_queue_writer_cli_plan(
transaction_preview=transaction_preview,
writer_preflight=writer_preflight,
execute_requested=args.execute,
apply_real_write=args.apply_real_write,
approval_token=args.approval_token,