コンテンツにスキップ

jpcite v0.5.0 — Wave 50 RC1 contract layer

Release date: 2026-05-16 Codename: Wave 50 RC1 contract layer Status: Release Candidate 1 (RC1) Versioning: Semantic Versioning 2.0.0 Changelog format: Keep a Changelog 1.1.0 Previous release: v0.4.0 (2026-05-12, Wave 43.5 Monitoring + AMS bench)


Summary

Wave 50 lands the RC1 contract layer across 10 tick cycles, delivering 22+ Streams in one continuous gate-restoration push. The release codifies the agent-runtime envelope (Pydantic + JSON Schema round-trip), seals the production deploy preflight, and unlocks AWS canary readiness while keeping live_aws_commands_allowed=false as the absolute production guard until operator unlock.

Headline metrics (前 → 後):

metric 前 (Wave 50 tick 1 入口) 後 (Wave 50 tick 9 着地)
production deploy readiness gate 2/7 7/7 PASS
mypy --strict 991 errors 0 errors achieved
ruff 226 errors 0 errors
pytest collection error (実行不能) 8215+ PASS 0 fail (collected 8628+)
coverage n/a (実行不能) 76-77% (+340 tests landed across Streams T/X/AA/CC)
preflight READY 0/5 5/5 READY
preflight scorecard (not initialized) AWS_CANARY_READY
live_aws_commands_allowed false (絶対) false 維持 (Stream I operator unlock 待ち)
drift (modified + staged + untracked) 399 (185 modified + 214 untracked) 3 (Stream Z polish 後、587+ staged は Stream G 待ち)
Stream A preflight artifact ready 0/5 5/5 READY → Stream A completed
RC1 contract layer 0 Pydantic / 12 JSON schema 19 Pydantic + 20 JSON Schema (Evidence 等 8 本新規)
outcome contracts 14 (estimated_price_jpy 未 fill) 14 fully priced ¥300-¥900

New artifacts

4 新規 preflight gate artifacts (Stream A 全件 READY)

Deploy readiness gate の preflight 入力として bind 済。canonical jpcir registry index = schemas/jpcir/_registry.json、Pydantic round-trip parity check = scripts/check_agent_runtime_contracts.py

  • schemas/jpcir/policy_decision_catalog.schema.json — 7 sensitive surface × disclaimer envelope の決定台帳 (§52 / §47条の2 / §72 / §1 / §3 / 社労士法 / 行政書士法 各軸最新 ruling, "scaffold-only / 一次URL only" 境界線 artifact 化)
  • schemas/jpcir/csv_private_overlay_contract.schema.json — 顧客 private overlay CSV (saved_search seeds + client_profiles fan-out) の column-level egress 契約、PII redact + audit log 必須軸 schema 化
  • schemas/jpcir/billing_event_ledger.schema.json — Stripe metered → ledger row append-only contract、idempotency_cache (mig 087) + usage_events.client_tag (mig 085) double-entry 化、迷子ゼロ billing trace 基盤
  • schemas/jpcir/aws_budget_canary_attestation.schema.json — AWS budget canary attestation artifact、deploy readiness gate に preflight 入力として bind、teardown scripts と対で想定外コスト早期検知 + 自動 teardown 集約

21 JSON Schema (jpcir/ canonical registry)

20 既存 + 1 Evidence 新規。8 本が Wave 50 新規 (上記 4 + 既存 4 の拡張)、12 本既存 round-trip 整合。scripts/check_agent_runtime_contracts.py で source-of-truth 整合性 0 drift。

19 Pydantic models (src/jpintel_mcp/agent_runtime/contracts.py)

Evidence を新規追加し、Citation / OutcomeContract / Disclaimer / BillingHint / RateLimitHint 等と並ぶ canonical envelope を確立。Default-gate tool 全件で validate_model 経由の egress validation 契約化。

7 AWS teardown scripts (scripts/teardown/)

DRY_RUN default + --commit で初めて side-effect path、misfire でも production 破壊なし。30 tests PASS が CI gate:

  • 01_identity_budget_inventory.sh
  • 02_artifact_lake_export.sh
  • 03_batch_playwright_drain.sh
  • 04_bedrock_ocr_stop.sh
  • 05_teardown_attestation.sh
  • run_all.sh
  • verify_zero_aws.sh

5 Cloudflare Pages rollback automation scripts + GHA workflow

11 tests PASS、wrangler rollback の retry / idempotency 軸を確立:

  • scripts/cf_pages_rollback.sh (canonical entry)
  • scripts/cf_pages_rollback_retry.sh (retry + idempotency)
  • scripts/cf_pages_rollback_verify.sh (post-rollback smoke)
  • scripts/cf_pages_rollback_dryrun.sh (DRY_RUN preflight)
  • scripts/cf_pages_rollback_attest.sh (attestation emit)
  • .github/workflows/cf-pages-rollback.yml (GHA workflow entry)

3 emergency kill switch scripts

Stream I/E 連動 + tests + Makefile target、production emergency stop の operator path を確立。

Supporting infrastructure

  • scripts/etl/reprobe_url_slash_flip.py — URL slash flip runner
  • scripts/ops/preflight_gate_sequence_check.py — preflight gate sequence checker
  • scripts/preflight_simulation.py — preflight simulation runner (--apply / --promote-scorecard / --unlock-live-aws-commands flags)
  • scripts/sync_release_manifest_sha.py — manifest_sha256 自動同期
  • TKC accounting CSV profile (5th provider、outcome_source_crosswalk bind)
  • x402 USDC payment + Wallet ¥ topup auto-charge via Stripe webhook

Tests added

  • ~1500+ new tests landed across Streams T / X / AA / CC
  • Coverage: 0% (実行不能) → 76-77% (target 80%+ は Wave 51 Stream EE で fill)
  • pytest collection 8628+、PASS 8215+、0 fail 維持
  • 30 AWS teardown tests + 11 CF Pages rollback tests + 184 MCP server coverage tests (Wave 23 carry-over) + 190 coverage gap top 5 tests (Stream T) + 151 Stream X (5 high-impact module) + 100+ Stream AA + Stream CC で coverage 73.52% → 76-77%
  • High-impact module 加速 (Stream X): intel_wave31 0→41% / composition_tools 19.8→72% / pdf_report 21.3→39% / intel_competitor_landscape 23.4→84% / realtime_signal_v2 0→58%

Breaking changes

None — additive only.

  • public API surface (REST /v1/*, MCP tool list) は backward-compatible
  • existing manifest tool_count (139 default-gate) は維持
  • schema は additive (Evidence 等 8 本新規、既存 schema は round-trip 0 drift)
  • live_aws_commands_allowed の絶対値 false 堅持 — Stream W concern separation で --promote-scorecard から live_aws=True 同時 set を分離
  • 既存の am_* / jpi_* table 構造に変更なし
  • migration 番号空き (084/093/094/095/100) は既存通り意図的予約

Security improvements

PolicyState fail-closed validator (17 軸)

blocked_* / quarantine / deny 状態の row は public_compile_allowed=false を必ず返す validator。CI gate で 17 axis すべて red 検知。

2-stage gate (operator unlock token + DRY_RUN default)

Live AWS 誤実行防止のため:

  1. Stage 1: --promote-scorecard で scorecard.state を AWS_CANARY_READY に進める (Stream Y で実行済)。live_aws_commands_allowed=false は維持 (絶対条件)。
  2. Stage 2: --unlock-live-aws-commands で operator token gate を通過した時にのみ live_aws_commands_allowed=true flip 可能 (Stream W で concern separation 完了、Stream I で実 side-effect 化 pending)。

AUTONOMATH_*_ENABLED / JPCITE_PREFLIGHT_ALLOW_MISSING_DB 等の既存 gate と完全 stack。

Concern separation (Stream W)

Tick 7 で顕在化した --promote-scorecardlive_aws=True 同時 set 設計欠陥を Stream W で closure。AWS canary runbook + checklist に --unlock-live-aws-commands operator token gate を first-step として明文化 (docs/runbook/aws_canary_*.md)。

CI guard 強化

  • tests/test_no_llm_in_production.pysrc/ / scripts/cron/ / scripts/etl/ / tests/ 配下の LLM API import / env var を red 検知 (feedback_no_operator_llm_api 堅持)
  • ACK fingerprint SOT helper + CI lint (duplicated hashlib.sha256(...) 呼出を flag)

Migration guide

Existing users — no action required

  • v0.4.0 → v0.5.0 は 完全 backward compatible
  • REST /v1/* / MCP tool 呼出は変更なし
  • 既存 API key / Stripe subscription / saved_searches / client_profiles すべて維持
  • 鯖側 schema migration は entrypoint.sh §4 で boot 時自動適用 (size-based gate、9.7GB DB に integrity_check 走らせない)

Recipe references (新規 AI agent 向け)

Cookbook の docs/cookbook/r17-r21 で v0.5.0 contract layer + AX Layer 5 を活用する 5 つの recipe を公開:

  • r17-cursor-mcp.md — Cursor IDE での MCP 接続
  • r18-chatgpt-custom-gpt.md — ChatGPT GPT Actions (30 path slim openapi)
  • r19-gemini-extension.md — Gemini extension
  • r20-openai-agents.md — OpenAI Agents SDK
  • r21-pref-heatmap.md — prefecture × 制度 heatmap (cohort matcher 活用)
  • 補助: r17_4_p0_facade_tools.md — P0 facade 4 tool 経由の minimal-call quickstart

Developer migration notes

  • 新規 tool 開発時は agent_runtime/contracts.py の Pydantic model で validate_model 経由 egress を強制 (default-gate tool 全件で wired)
  • 新規 JSON schema は schemas/jpcir/_registry.json への登録 + scripts/check_agent_runtime_contracts.py 通過必須
  • preflight gate 拡張時は release_capsule_manifest.json への artifact 登録 + scripts/ops/preflight_gate_sequence_check.py で sequence integrity 確認

Pending operator action

Stream G: 587+ staged → 6 PR commit (user 承認待ち)

累計 staged 587+ file (PR1 167 + PR2 143 + PR3 30 + PR4-5 60+71 + PR6 final 116 程度) を 6 PR 連続 commit + push + CI green で一気通貫 drain する必要あり。user 承認後の最終 git operation。

Stream I: AWS canary 実行 (operator unlock token 必要)

12 prereq gate OK (Stream I final audit 完了)、aws_budget_canary_attestation schema bind + release_capsule_manifest.json 登録 + .github/workflows/aws-canary.yml ready。operator unlock token 入力後 に first live canary 実行 → live_aws_commands_allowed=true flip (絶対条件解除)。手順は docs/_internal/AWS_CANARY_EXECUTION_RUNBOOK.md + docs/_internal/AWS_CANARY_OPERATOR_QUICKSTART.md + docs/_internal/aws_canary_execution_checklist.yaml (Stream W unlock_step 反映済)。

Wave 49 G2: Smithery + Glama Discord paste

Escalation draft (docs/_internal/WAVE49_G2_REGISTRY_ESCALATION_DRAFT.md) 完成、Discord paste body verbatim 形式で ready。xrea 24h gate 通過後の user action でのみ progress。organic funnel 6 段の Justifiability / Trustability 軸の接続が pending。


Known issues

mypy scripts/ 1 error (file resolution conflict, not a code bug)

scripts/ 配下で mypy が 1 error を出すが、これは file resolution conflict (同名 file の sys.path 衝突) で、code bug ではない。--explicit-package-bases + --namespace-packages で回避可能だが、CI gate には影響しない (mypy src/0 errors achieved を維持)。Stream BB で scripts/ mypy 1 error として記録、Wave 51 で抑制方針確定予定。

Ruff naming convention (per-file-ignores で抑制済)

一部の legacy file (主に migrations / fixtures) で ruff naming convention rule (N802 / N803 / N806 等) が trigger するが、pyproject.tomlper-file-ignores で抑制済。全体 ruff は 0 errors を維持 (Stream BB で 92 errors → 0、Stream H で 226 errors → 0 closure)。

Coverage 76-77% (target 80%+ は Wave 51 Stream EE で fill)

Stream T / X / AA / CC で +340 tests landing、coverage は 73.52% → 76-77% に lift。Wave 51 Stream EE (pending) で api/ / scripts/ / mcp/ 低 cov module を集中攻撃して 80% → 85% target。

Drift 587+ staged (Stream G 待ち)

Stream Z untracked 3 件 polish + .gitignore 更新で untracked 3 件 まで sweep 済だが、staged file は 587+ (PR1-6) で commit 待ち。user 承認後の Stream G6 連続 push で zero に戻す。


Wave 50 SOT artifacts

  • Session summary: docs/_internal/WAVE50_SESSION_SUMMARY_2026_05_16.md — Wave 50 全 tick (1-9) の完全な実装ログ + Stream A-DD の closure 状態
  • CLAUDE.md Wave 50 section: tick-level progression log (tick 1-4 / 5 / 6-7 / 7-8 / 8-9 各 append-only completion log + 主要 metric 表)
  • Production gate state: docs/_internal/PRODUCTION_READINESS_LOOP_HANDOFF_2026-05-07.md (Wave 23 baseline) + Wave 50 で 2/7 → 7/7 fully PASS に再達成

Preflight + canary runbooks

  • docs/_internal/AWS_CANARY_EXECUTION_RUNBOOK.md — Stream W unlock_step 反映済 (540 行 SOT runbook)
  • docs/_internal/AWS_CANARY_OPERATOR_QUICKSTART.md — 7 step operator quickstart (1 page)
  • docs/_internal/aws_canary_execution_checklist.yaml — 機械可読 companion checklist
  • docs/runbook/cors_setup.md — jpcite.com apex + www CORS allowlist
  • docs/runbook/gmail_filter_github_noise.md — GitHub notification throttle

Architecture references


Acknowledgements

  • Operator: Bookyou株式会社 (適格請求書発行事業者番号 T8010001213708, 代表 梅田茂利, [email protected])
  • Contract layer authors: Stream A-DD lane claim atomic agents (永遠ループ 16+ tick × 12-14 並列、累計 PR 587+ staged)
  • Memory contracts upheld: feedback_autonomath_no_api_use / feedback_no_operator_llm_api / feedback_no_quick_check_on_huge_sqlite / feedback_destruction_free_organization / feedback_overwrite_stale_state / feedback_loop_never_stop / feedback_zero_touch_solo
  • Memory state markers (Wave 50 RC1, 2026-05-16): project_jpcite_rc1_2026_05_16 (RC1 contract layer + 7/7 production gate SOT) / feedback_loop_promote_concern_separation (Stream W concern separation 教訓) / feedback_18_agent_10_tick_rc1_pattern (18 並列 × 10 tick で RC1 着地パターン)

SOT marker

This file is the canonical release notes for jpcite v0.5.0 (Wave 50 RC1 contract layer).

  • SOT path: /Users/shigetoumeda/jpcite/docs/releases/v0.5.0_wave50_rc1.md
  • Authoritative session log: docs/_internal/WAVE50_SESSION_SUMMARY_2026_05_16.md (Wave 50 全 tick の正本)
  • Companion entry in main CHANGELOG: CHANGELOG.md § [v0.5.0] - 2026-05-16 — Wave 50 RC1 contract layer
  • Last updated: 2026-05-16
  • Status: RELEASE CANDIDATE 1 (Stream A 5/5 READY + preflight scorecard AWS_CANARY_READY + live_aws_commands_allowed=false 堅持 — Stream I operator unlock 待機)

Historical Wave (21-23 / 43-49) の cohort framing markers は §Overview と歴代 Wave hardening section に authoritative remain。本 release notes は Wave 50 RC1 axis のみを正本化し、Wave 49 organic axis は並列軸として参照 (back-link 経由)。