From ae9626db981caaaea665fb64ef12f6f480372412 Mon Sep 17 00:00:00 2001 From: Miro Date: Wed, 14 Oct 2026 12:50:16 +0800 Subject: [PATCH 1/3] fix(evolver): retain campaign usage identity during dispatch --- .../src/inalpha_evolver/storage/campaigns.py | 2 +- services/evolver/tests/test_loop_handoff.py | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/services/evolver/src/inalpha_evolver/storage/campaigns.py b/services/evolver/src/inalpha_evolver/storage/campaigns.py index 1af7c7c6..f6d2d977 100644 --- a/services/evolver/src/inalpha_evolver/storage/campaigns.py +++ b/services/evolver/src/inalpha_evolver/storage/campaigns.py @@ -13,7 +13,7 @@ from ..hypothesis.compiler import canonical_spec_hash from ..hypothesis.models import HypothesisSpec -_CAMPAIGN_COLUMNS = """campaign_id,owner_account_id,source_run_id,status,active_generation, +_CAMPAIGN_COLUMNS = """campaign_id,owner_account_id,requested_by_sub,source_run_id,status,active_generation, hypothesis_budget,implementations_per_hypothesis,max_generations,event_snapshot_id,data_snapshot_id,frozen_config, llm_snapshot,llm_config_digest,llm_credential_grant,llm_cost_usd, locked_candidate_id,holdout_consumed_at,forward_sandbox_id,forward_started_at,forward_deadline_at, diff --git a/services/evolver/tests/test_loop_handoff.py b/services/evolver/tests/test_loop_handoff.py index 5347bcf3..791d191b 100644 --- a/services/evolver/tests/test_loop_handoff.py +++ b/services/evolver/tests/test_loop_handoff.py @@ -8,6 +8,7 @@ import pytest +from inalpha_evolver.api.schemas import CampaignResponse from inalpha_evolver.config import EvolverSettings from inalpha_evolver.data.persistent_snapshot import discovery_dataset, persist_loop_data_snapshot from inalpha_evolver.runtime import loop_campaign @@ -109,3 +110,30 @@ async def fetch(snapshot_id, **kwargs): loop = await loops.get_loop(database, worker["loop_id"], worker["owner_account_id"]) assert loop["status"] == "campaign_running" assert loop["campaign_id"] == campaign_id + + +@pytest.mark.asyncio +async def test_campaign_dispatch_retains_persisted_usage_identity(database, monkeypatch): + """Real dispatch must retain the owner subject consumed by the model usage recorder.""" + worker, _, snapshot = await ready_loop(database) + + @asynccontextmanager + async def connection(): + yield database + + async def fetch(*args, **kwargs): + return snapshot + + monkeypatch.setattr(loop_campaign, "get_conn", connection) + monkeypatch.setattr(loop_campaign, "fetch_event_snapshot", fetch) + campaign_id = await loop_campaign.handoff_campaign( + worker, + EvolverSettings(EVENT_EVOLUTION_ENABLED=True), + ) + claimed = await campaigns.claim_next_campaign(database, worker_id="usage-identity-test") + assert claimed is not None + assert claimed["campaign_id"] == campaign_id + assert claimed["requested_by_sub"] == worker["requested_by_sub"] + projected = await campaigns.get_campaign(database, campaign_id, worker["owner_account_id"]) + assert projected["requested_by_sub"] == worker["requested_by_sub"] + assert "requested_by_sub" not in CampaignResponse(**projected).model_dump() From fdc79dd876932e99417f8ce6bb1167e90f120268 Mon Sep 17 00:00:00 2001 From: Miro Date: Wed, 14 Oct 2026 12:51:31 +0800 Subject: [PATCH 2/3] docs(e2): record post-confirmation owner preflight and runtime parity --- docs/04-current-state.md | 10 +- ...e2-owner-post-confirmation-2026-10-14.json | 114 ++++++++++++++++++ .../e2-runtime-source-parity-2026-10-14.json | 87 +++++++++++++ 3 files changed, 208 insertions(+), 3 deletions(-) create mode 100644 docs/validation/e2-owner-post-confirmation-2026-10-14.json create mode 100644 docs/validation/e2-runtime-source-parity-2026-10-14.json diff --git a/docs/04-current-state.md b/docs/04-current-state.md index 1ec1409f..71b45ac0 100644 --- a/docs/04-current-state.md +++ b/docs/04-current-state.md @@ -10,11 +10,15 @@ Inalpha 是 AI agent 编排与多 Python kernel 的量化实验框架。D-12 因 下单必须经过 `trade.create_plan → trade.approve_plan → trade.execute_plan` 与机器风控。演化研究不会自动 promote、启动 Runner 或下单。 架构与模块职责见 [架构总图](01-architecture-overview.md) / [内核设计](03-kernel-design.md)。 -最新事件审核发布(2026-10-14):[PR #238](https://github.com/mirror29/inalpha/pull/238)已合并,仅Data/Research固定`9fdb8b8a` healthy,schema0069,其余八容器ID未变。精确head/main CI、七镜像成功,评审与合并tree相同。最终自动CR先因GitHub GraphQL500未评审,重跑仍无有效正文,不能算自动CR通过;此前具体发现已修复/回应,专项增量复核无确认新增阻断。五轮空闲检查通过,配置/DB备份600、TOC可读,未做恢复演练。独立SSH复查DBinalpha/0069、审计0、375v2与35v3版本、Loop/campaign0,新接口未登录401,公共登录200。真实原文在部署Research helper经正常Data服务鉴权预览为监管→监管、未写入;不是认证Research入站HTTP或owner审批验收,不能一概撤回含bank原文。见 [生产回执](validation/event-fact-review-deployment-2026-10-14.json)。 +最新正常 owner 免费预检(2026-10-14T04:05:43.619UTC):BTC / ETH / SOL 独立事件上界 **3/8、0/8、1/8**,选择段事实21/0/1,全部不足,首轮不选择资产,没有费用审批或模型调用。BTC旧监管质量提示在这次响应中不再出现,但不代表语义质量或正式评估通过;默认截止已推进到04:00,不能与此前03:00窗口作同输入因果比较。最新闭合末根开盘03:00、收盘04:00,距要求末根差值0、收盘墙钟年龄343.619秒。中文桌面免费预检取得生产证据,移动、冻结审批与五代搜索仍未完成。见 [确认后owner回执](validation/e2-owner-post-confirmation-2026-10-14.json)。 + +同轮只读运行版本核对:现场仓库已包含其他任务PR #241,容器ID较此前回执不同;本任务没有重复部署。Data / Research / Evolver的OCI revision与标签不一致,Dashboard / Mastra没有OCI revision;不能仅凭标签宣称精确镜像源码版本。独立比对三个Python业务包共200个源码文件与`9fdb8b8a`全部相同,范围不含_shared、依赖或客户端bundle。数据库目标已核对/schema0069,纠正审计3,375v2/41v3版本,Loop/campaign0;版本数量不是独立覆盖。当前digest/容器证据见 [运行源码核对](validation/e2-runtime-source-parity-2026-10-14.json)。以下容器未变和待验证结论均是各自历史采样边界,不能替代本段最新状态。 + +历史事件审核发布(2026-10-14):[PR #238](https://github.com/mirror29/inalpha/pull/238)已合并,仅Data/Research固定`9fdb8b8a` healthy,schema0069,其余八容器ID未变。精确head/main CI、七镜像成功,评审与合并tree相同。最终自动CR先因GitHub GraphQL500未评审,重跑仍无有效正文,不能算自动CR通过;此前具体发现已修复/回应,专项增量复核无确认新增阻断。五轮空闲检查通过,配置/DB备份600、TOC可读,未做恢复演练。独立SSH复查DBinalpha/0069、审计0、375v2与35v3版本、Loop/campaign0,新接口未登录401,公共登录200。真实原文在部署Research helper经正常Data服务鉴权预览为监管→监管、未写入;不是认证Research入站HTTP或owner审批验收,不能一概撤回含bank原文。见 [生产回执](validation/event-fact-review-deployment-2026-10-14.json)。 2026-10-14 后续生产单条纠正验收:正常 Research helper 经 Data 服务鉴权逐条预览31条有效v2监管事实,15条变为other、16条仍监管,预览全部未写入。明确阅读 Kraken SoFiUSD 科普归档537字符后,仅纠正其中因bank误命中ban的一条:数据库时间03:05:54.098265UTC追加撤回与other替代,原始摘要/证据/有效时间保留。第二个独立helper进程显式重发同一请求,created=false、审计/替代/撤回各1且ID不变;独立只读查询确认纠正前仍见原监管事实,之后仅见other。这里是单条SQL可见性与helper→Data生产证据,不是认证Research入站HTTP、服务重启、响应丢失或owner E2验收。其余30条未纠正;375v2版本保留,38v3含持续抽取与纠正版本,不等于独立覆盖。Loop/campaign仍0。Chrome旧页点击免费盘点后未见新结果,刷新暂空白,不能认定当前覆盖或产品故障。见 [单条生产回执](validation/event-fact-single-production-2026-10-14.json)。 -同轮后续已定位并明确检查BTC两条旧监管事实:CoinDesk归档仅76字符标题含SEC批准(无完整正文),Cointelegraph归档547字符含德国监管拒绝MiCA与停牌。两者保留监管分类,各经正常Research helper→Data追加v3同类确认,03:31:19.864993/03:31:24.446412UTC,未撤回;原哈希/证据/有效时间保留,独立只读审计各1、总审计3。不是全部语义质量通过;此前31预览中余28条本轮未主动写入。旧快照不变,确认后正常owner新预检尚未取得:用户切换Chrome至其他项目,导航已停止,不改该标签。不能由这些确认宣称当前质量守卫解除或覆盖达标。见 [BTC确认回执](validation/event-fact-btc-confirmation-2026-10-14.json)。 +同轮后续已定位并明确检查BTC两条旧监管事实:CoinDesk归档仅76字符标题含SEC批准(无完整正文),Cointelegraph归档547字符含德国监管拒绝MiCA与停牌。两者保留监管分类,各经正常Research helper→Data追加v3同类确认,03:31:19.864993/03:31:24.446412UTC,未撤回;原哈希/证据/有效时间保留,独立只读审计各1、总审计3。不是全部语义质量通过;此前31预览中余28条本轮未主动写入。旧快照不变,当时确认后新预检尚未取得;后续04:05正常owner结果见本页最新段落。不能由这些确认宣称全部质量或覆盖达标。见 [BTC确认回执](validation/event-fact-btc-confirmation-2026-10-14.json)。 正常owner最近一次免费盘点(2026-10-14T03:14:24.850UTC,早于上述两条确认):Chrome新标签明确导航后恢复,BTC/ETH/SOL选择段事实22/0/1、独立上界**3/8、0/8、1/8**,全部不足,不启动任何资产;BTC还提示完整发现上下文2条旧监管事实风险(不等于2条已确认错误)。三者最新闭合1h末根开盘与要求均02:00UTC,差值0;收盘03:00距采样14分24.850秒,不是墙钟年龄0。英文SOL准备页保留targetKind/targetId,建议窗口仍1/8;截止小时03→02的实际键盘操作使旧结果隐藏,恢复建议窗口03后重新检查仍1/8,原策略窗口显示未变。切回中文URL也保留目标。中文矩阵与英文桌面免费准备通过该范围;移动视口、服务端旧审批失效、费用审批与搜索仍待验收。运行镜像现场SSH仍Dashboard/Mastra/Evolver76727f6d、Data/Research9fdb8b8a;未独立核对客户端bundle摘要。见 [最新owner回执](validation/e2-owner-matrix-language-2026-10-14.json)。 两次窗口不可直接比较:10月13日BTC/ETH选择10/8T02至10/10T14、SOL 10/8T13至10/10T20;10月14日BTC/ETH为10/8T16至10/11T09、SOL 10/9T03至10/11T14。建议截止推进导致自然分段移动,快照和守卫发布版本也不同;逐事件差异尚未对账,不能据上界变化宣称数据退化或守卫过滤。当前守卫仅追加质量阻塞,不扣减原始上界。 @@ -68,7 +72,7 @@ PR #219(业务 `ab5fd15b`)的本地测试边界:Evolver 335 通过 / 1 跳 - 覆盖矩阵子交付已完成代码、自动化与部署,并取得正常 owner 中文桌面结果;固定每资产最早运行中的受支持策略,统一采样,只比较正常建议窗口的输入覆盖。源码与自动化历史见 [本地回执](validation/e2-coverage-matrix-local-2026-10-13.json),当前生产结论见 [生产回执](validation/e2-coverage-matrix-production-2026-10-13.json)。 - 最新10月14日BTC 3/8、ETH 0/8、SOL 1/8(此前10月13日6/8、3/8、2/8来自不同选择窗口,不是同一冻结输入的回归对照),全部阻塞,不选择启动资产;匹配对照、FDR与研究结果尚未评估。下一步排查资产映射、抽取与去重缺口,再据证据决定补充来源。四来源近期各8次抓取成功仅是轮询日志观察,不证明覆盖足够。后续只读审计371任务全部completed,无原文漏建任务/完成无事实;三资产已标注事实无空asset_ids,但语义映射、抽取质量与跨来源去重仍待核查,不能据此认定全部数据质量通过。 - 已确认的P0数据质量缺陷:v2监管规则直接匹配 `ban` 子串,17条监管事实只命中这类非独立词匹配。[PR #233](https://github.com/mirror29/inalpha/pull/233) 已将后续抽取修正并部署为v3;17条历史事实保持不可变,未从原统计中追溯排除;上述覆盖矩阵仅是现有输入的观察,不能据其上界认定语义质量合格或直接启动付费搜索。后续需区分历史v2与修复后的证据,不能重写旧事实时间以通过验收。结构化质量阻塞、listing/SEC规则与不同URL同事件审计追踪于 [#234](https://github.com/mirror29/inalpha/issues/234),部署前后续只读观察已出现5条真实v3事实(最新available_at09:57:24.843018UTC),375条v2不变;不等于独立覆盖、语义或正式评估通过。 -- 本地已补已知旧版质量诊断:免费准备和模型凭据访问前检查v1/v2监管事实与缺失/未知抽取版本;覆盖模型实际读取的完整发现上下文(包括窗口前事实),保留原始上界和事实。双语页面显示潜在风险数量、版本与下一步;355项Evolver隔离数据库测试通过/1跳过、208项Dashboard与16项相关编排测试通过(最终错误契约另有20项Python回归)。完整测试曾有一次五代候选状态断言失败,单独复现与最新完整重跑通过,原因尚未确认并保留回执。**质量守卫已随PR #236部署,正常owner界面验收仍待完成**;不提供对同一历史快照的人工放行接口,新增v3不会自动解除旧上下文阻塞。见 [本地质量回执](validation/e2-event-quality-local-2026-10-13.json)。 +- 本地已补已知旧版质量诊断:免费准备和模型凭据访问前检查v1/v2监管事实与缺失/未知抽取版本;覆盖模型实际读取的完整发现上下文(包括窗口前事实),保留原始上界和事实。双语页面显示潜在风险数量、版本与下一步;355项Evolver隔离数据库测试通过/1跳过、208项Dashboard与16项相关编排测试通过(最终错误契约另有20项Python回归)。完整测试曾有一次五代候选状态断言失败,单独复现与最新完整重跑通过,原因尚未确认并保留回执。**质量守卫已随PR #236部署;正常owner桌面阻塞与后续提示变化已取得上述证据,移动与执行仍待完成**;不提供对同一历史快照的人工放行接口,新增v3不会自动解除旧上下文阻塞。见 [本地质量回执](validation/e2-event-quality-local-2026-10-13.json)。 - 来源轮询健康的结构化展示、移动交互与正常owner审批执行仍待办。10月14日正常owner英文桌面准备与语言切换保留目标已取得上述局部证据;中文矩阵及数据阻塞已验证,不等于整个第一阶段完成。 1. PR #219 的精确 head CI、主分支 CI、镜像构建、专项审查与三个服务部署已完成;保留旧镜像1dc8fa78和备份,Chrome 正常 owner 连接已恢复,已观察到免费准备与不足提示;尚无绑定版本的完整验收。 diff --git a/docs/validation/e2-owner-post-confirmation-2026-10-14.json b/docs/validation/e2-owner-post-confirmation-2026-10-14.json new file mode 100644 index 00000000..61e1ed01 --- /dev/null +++ b/docs/validation/e2-owner-post-confirmation-2026-10-14.json @@ -0,0 +1,114 @@ +{ + "date": "2026-10-14", + "status": "normal_owner_post_confirmation_free_preflight_inputs_insufficient", + "sampled_at": "2026-10-14T04:05:43.619Z", + "access": "Existing logged-in Chrome owner session; native CUA controls; no credentials read or fabricated.", + "assets": [ + { + "asset": "BTC", + "timeframe": "1h", + "target_id": "8ec05df8-522b-48b6-9dc5-fdd45aba0205", + "suggested_from": "2026-09-30T10:00:00Z", + "suggested_to": "2026-10-14T04:00:00Z", + "bars": [ + 198, + 66, + 66 + ], + "selection_from": "2026-10-08T17:00:00Z", + "selection_to": "2026-10-11T10:00:00Z", + "selection_facts": 21, + "independent_upper_bound": 3, + "required_threshold": 8, + "upper_bound_by_type": { + "other": 2, + "exploit": 1 + }, + "legacy_regulatory_risks": 0, + "quality_inspected_facts": 89, + "quality_versions": { + "deterministic-event-extractor-v2": 89 + }, + "snapshot_fact_versions": 121, + "first_snapshot_available_at": "2026-09-30T10:36:41.860008Z" + }, + { + "asset": "ETH", + "timeframe": "1h", + "target_id": "33ef02a0-dcf7-47a3-a708-9d4ca1433860", + "suggested_from": "2026-09-30T10:00:00Z", + "suggested_to": "2026-10-14T04:00:00Z", + "bars": [ + 198, + 66, + 66 + ], + "selection_from": "2026-10-08T17:00:00Z", + "selection_to": "2026-10-11T10:00:00Z", + "selection_facts": 0, + "independent_upper_bound": 0, + "required_threshold": 8, + "upper_bound_by_type": {}, + "quality_inspected_facts": 10, + "quality_versions": { + "deterministic-event-extractor-v2": 10 + }, + "snapshot_fact_versions": 13, + "first_snapshot_available_at": "2026-09-30T10:36:41.887149Z" + }, + { + "asset": "SOL", + "timeframe": "1h", + "target_id": "7c09cdb0-cd8a-43b6-8e66-787eb9f7aaed", + "suggested_from": "2026-10-01T14:00:00Z", + "suggested_to": "2026-10-14T04:00:00Z", + "bars": [ + 181, + 60, + 61 + ], + "selection_from": "2026-10-09T04:00:00Z", + "selection_to": "2026-10-11T15:00:00Z", + "selection_facts": 1, + "independent_upper_bound": 1, + "required_threshold": 8, + "upper_bound_by_type": { + "upgrade": 1 + }, + "quality_inspected_facts": 5, + "quality_versions": { + "deterministic-event-extractor-v2": 5 + }, + "snapshot_fact_versions": 6, + "first_snapshot_available_at": "2026-10-01T14:37:01.079456Z" + } + ], + "latest_closed_bar": { + "open": "2026-10-14T03:00:00Z", + "close": "2026-10-14T04:00:00Z", + "required_open": "2026-10-14T03:00:00Z", + "lag_vs_required_seconds": 0, + "open_age_seconds": 3943.619, + "close_age_seconds": 343.619 + }, + "selection": { + "selected_asset": null, + "reason": "All three necessary-input upper bounds are below eight; matching, FDR and holdout not evaluated." + }, + "quality_boundary": [ + "BTC legacy-regulatory warning absent in this fresh normal-owner response; does not certify semantic accuracy.", + "Confirmation availability is after the selection end; v3 confirmations are not backdated into selection quality counts.", + "Default cutoff moved one hour relative to the 03:14 observation; this is not a controlled same-window causal comparison." + ], + "interactions": [ + "Existing owner Chrome session, explicit new tab navigation to /zh/evolution, free three-asset check, expanded coverage/quality/window details." + ], + "not_tested": [ + "Mobile viewport", + "Frozen approval and model execution", + "Response loss or process recovery", + "Client bundle digest" + ], + "new_model_calls": 0, + "production_e2_searches_started": 0 +} diff --git a/docs/validation/e2-runtime-source-parity-2026-10-14.json b/docs/validation/e2-runtime-source-parity-2026-10-14.json new file mode 100644 index 00000000..9d664a2f --- /dev/null +++ b/docs/validation/e2-runtime-source-parity-2026-10-14.json @@ -0,0 +1,87 @@ +{ + "date": "2026-10-14", + "scope": "Read-only production metadata and public Python package source parity, no deployment performed by this task.", + "server_repository": "0319b57d91476228046a7b74067fe6812c0777c6", + "concurrent_change": "Server repository identifies merged PR241 disk retention/log rotation; container IDs differ from this task earlier receipts. Historical unchanged-container claims apply only to their own deployments.", + "services": [ + { + "service": "data", + "container_id": "c56d386bb37054ac486c8788d8b63e31fdb8e44c62597f0bc233acec8653af9d", + "image_digest": "sha256:adbe7989226e4925ab214c09c907c3566618a9dbeb115df3c1fded320e066a12", + "health": "healthy", + "oci_revision": "ea4560831e503c6ce34d18739476a71ac6e9a9de", + "tags": [ + "ghcr.io/mirror29/inalpha-data:9fdb8b8aa0d49a36eddc344c0955b41e28cd9848" + ] + }, + { + "service": "research", + "container_id": "855add3b73f90e051d11559ed8d5743b160ba57987d60141429167fc3cdcf671", + "image_digest": "sha256:3dbebba4ab0a06673c419c521b778637a07539943f918b331c679a47449fe6ec", + "health": "healthy", + "oci_revision": "ea4560831e503c6ce34d18739476a71ac6e9a9de", + "tags": [ + "ghcr.io/mirror29/inalpha-research:9fdb8b8aa0d49a36eddc344c0955b41e28cd9848" + ] + }, + { + "service": "dashboard", + "container_id": "9b61d5813f85960de3cf5b127abd9dcf48f9c6563698f38429a957d6a43a8d63", + "image_digest": "sha256:ed93f7714ed0cd035309687adcbef48d606d02032ebe09bf10bdfe5563733ece", + "health": "healthy", + "oci_revision": null, + "tags": [ + "ghcr.io/mirror29/inalpha-dashboard:76727f6d7a77d3015d6e9a604e11874b3caf3b0d" + ] + }, + { + "service": "mastra", + "container_id": "51f1dbad74ccfc5ea9027c4fdb38746e6ba457608ff276a9656cfd33c868f278", + "image_digest": "sha256:10e0b50b58b50facced89fff26a482d60d075d0d9e95b3cce7b1dd9dffd5e6ed", + "health": "healthy", + "oci_revision": null, + "tags": [ + "ghcr.io/mirror29/inalpha-mastra:76727f6d7a77d3015d6e9a604e11874b3caf3b0d" + ] + }, + { + "service": "evolver", + "container_id": "c55a5efecf6946b82b4993697f68092f8ae5e94259e9423f97c4f133c250f671", + "image_digest": "sha256:2587420863671943cbbe310cd174f19643cd4f1b0ca4f3bb40476ef75026d8c7", + "health": "healthy", + "oci_revision": "ea4560831e503c6ce34d18739476a71ac6e9a9de", + "tags": [ + "ghcr.io/mirror29/inalpha-evolver:76727f6d7a77d3015d6e9a604e11874b3caf3b0d" + ] + } + ], + "database": { + "name": "inalpha", + "schema": "0069", + "correction_audits": 3, + "v2_fact_versions": 375, + "v3_fact_versions": 41, + "loops": 0, + "campaigns": 0 + }, + "source_parity": { + "reference_commit": "9fdb8b8aa0d49a36eddc344c0955b41e28cd9848", + "method": "Hash imported public package *.py files in each running container; compare SHA256 to git show reference path.", + "files": { + "data": 57, + "research": 52, + "evolver": 91 + }, + "mismatches": 0, + "extra_files": 0, + "limits": "200 package files only; excludes shared packages, dependencies, full image reproducibility and Dashboard/Mastra bundles. Tags and OCI labels do not independently prove the exact source revision." + }, + "probes": { + "unauthenticated_data_read": 401, + "unauthenticated_data_correction": 401, + "unauthenticated_research_review": 401, + "public_login": 200 + }, + "new_model_calls": 0, + "production_e2_searches_started": 0 +} From cea74c9234641934b01eb518d26bd506619eab12 Mon Sep 17 00:00:00 2001 From: Miro Date: Wed, 14 Oct 2026 12:53:03 +0800 Subject: [PATCH 3/3] docs(e2): record full application response recovery and remaining limits --- docs/04-current-state.md | 3 + ...full-app-response-recovery-2026-10-14.json | 150 ++++++++++++++++++ 2 files changed, 153 insertions(+) create mode 100644 docs/validation/e2-full-app-response-recovery-2026-10-14.json diff --git a/docs/04-current-state.md b/docs/04-current-state.md index 71b45ac0..a7fe5a94 100644 --- a/docs/04-current-state.md +++ b/docs/04-current-state.md @@ -91,6 +91,9 @@ PR #219(业务 `ab5fd15b`)的本地测试边界:Evolver 335 通过 / 1 跳 ### P0 · 可靠性与真实五代搜索 +- 2026-10-14 完整应用发现并修复实际阻断:campaign持久化了发起用户,但调度投影漏`requested_by_sub`,真实模型使用路径报费用身份缺失。`ae9626db`补回内部字段,公开响应schema仍不暴露;新数据库回归修复前1失败、修复后1通过。完整Evolver新隔离数据库357通过/1跳过,相关Ruff通过;针对改动文件Mypy10项tuple/dict错误与main影子源码输出完全相同,不能说类型检查通过。修复尚未部署,不称生产执行已修好。 +- 同日完整 Evolver lifespan/dispatcher 源码进程隔离探索通过:新正确迁移链库中,离线模型返回且2条响应checkpoint保存、整代提案0时SIGKILL,租约自然过期后重启完成五代/120实现;离线调用2+8,总10而非12,合成账本0.000780、未知预留0、10attempts。最终`INSUFFICIENT_FDR_EVIDENCE`,无冠军/Forward/holdout。外围签发器、凭据端点、事件快照和provider HTTP transport均是本地夹具;不是同镜像、真实owner、完整外围服务栈或生产恢复。此临时进程脚本尚非维护中的CI回归,早先两次启动失败也保留。见 [完整应用恢复回执](validation/e2-full-app-response-recovery-2026-10-14.json)。 + - 已有自动化和隔离数据库的租约、幂等、审批恢复、交接测试。完整服务进程退出、在途模型请求、显式失败重试、旧 worker 隔离仍需独立服务验收;数据库对象重建不等于生产重启通过。 - 2026-10-12 完整 Evolver 应用隔离进程检查已通过独立 E1 中断收口:SIGKILL 后重启收口 running 任务、保留已完成候选/已知费用/未知用量,第二次重启结果相同,配置的下游端点请求 0(未审计全部出站网络)。使用新迁移链库与合成夹具,没有正常 owner 授权或在途模型请求;不等于 E2 授权恢复、同镜像容器或生产重启验收。见 [隔离进程回执](validation/evolver-process-recovery-2026-10-12.json)。 - 2026-10-12 新隔离库回归:恢复、租约隔离与受控交接等 19 项通过;两个五代搜索用例均到达既有 240 秒超时,之后在不改代码、门槛或 240 秒限制下分开复现,首次运行 185.02 秒、提案恢复 217.45 秒均通过;恢复用例离线模型调用 8 次,首次运行 10 次。原全量超时保留,资源竞争仅为假设;不等于完整服务重启或生产五代通过。见上述 [本次回执](validation/e2-owner-followup-2026-10-12.json),不能将受控 holdout 结果当作真实长期证据。 diff --git a/docs/validation/e2-full-app-response-recovery-2026-10-14.json b/docs/validation/e2-full-app-response-recovery-2026-10-14.json new file mode 100644 index 00000000..1b244151 --- /dev/null +++ b/docs/validation/e2-full-app-response-recovery-2026-10-14.json @@ -0,0 +1,150 @@ +{ + "database": "inalpha_full_response_audit_e5df474441d3446a9ed6f6440ba61b26", + "result": "passed", + "scope": "full actual Evolver application lifespan and dispatchers; provider SDK HTTP transport replaced, synthetic local signer/Dashboard/Data; source process, not production container or real owner", + "initial_health": { + "status": "ok", + "service": "inalpha-evolver", + "event_evolution": "enabled" + }, + "forced_exit_code": -9, + "before": { + "status": "replaying", + "active_generation": 1, + "lease_token": "9b92ff4b-c30d-4afb-9a39-54b73894d6a0", + "lease_expires_at": "2026-10-14 04:47:35.366994+00:00", + "locked_candidate_id": null, + "forward_sandbox_id": null, + "holdout_consumed_at": null, + "failure_code": null, + "proposal_count": 0, + "response_count": 2, + "succeeded": 0, + "ledger": { + "spent_usd": "0.000156", + "reserved_usd": "0E-7", + "max_cost_usd": "1", + "attempts": 2 + }, + "expired": false + }, + "restart_health": { + "status": "ok", + "service": "inalpha-evolver", + "event_evolution": "enabled" + }, + "after": { + "status": "insufficient_evidence", + "active_generation": 5, + "lease_token": "eaa2865f-5ce2-4a2c-babe-39cfcecc79d7", + "lease_expires_at": "2026-10-14 04:48:58.105346+00:00", + "locked_candidate_id": null, + "forward_sandbox_id": null, + "holdout_consumed_at": null, + "failure_code": "INSUFFICIENT_FDR_EVIDENCE", + "proposal_count": 5, + "response_count": 10, + "succeeded": 120, + "ledger": { + "spent_usd": "0.000780", + "reserved_usd": "0E-7", + "max_cost_usd": "1", + "attempts": 10 + }, + "expired": false + }, + "offline_provider_calls": [ + "before", + "before", + "after", + "after", + "after", + "after", + "after", + "after", + "after", + "after" + ], + "local_peripheral_requests": [ + "snapshot", + "local-fixture-grant", + "credential", + "snapshot", + "local-fixture-grant", + "credential" + ], + "cleanup_exit_code": -15, + "date": "2026-10-14", + "source_commit": "ae9626db981caaaea665fb64ef12f6f480372412", + "production_status": "not_deployed", + "fault": "Parent pauses offline provider responses, acquires ACCESS EXCLUSIVE lock on proposal table in isolated DB, releases provider responses, observes two durable response checkpoints and no proposals, then SIGKILL. Releasing lock and waiting natural 30-second lease expiration permits full application restart.", + "fixtures": { + "bars": 10, + "selection_facts": 8, + "event_types": [ + "listing", + "delisting", + "exploit", + "depeg", + "regulatory", + "upgrade", + "macro", + "other" + ], + "purpose": "Synthetic necessary-input fixture, no statistical gates changed; not evidence of real asset coverage.", + "baseline": "Synthetic completed baseline and persisted local authorization; not original owner approval or baseline recovery.", + "provider": "Actual SDK completion parsing/usage path with replaced HTTP transport; invalid DSL uses existing fallback; no paid external model." + }, + "previous_failures": [ + { + "database": "inalpha_full_response_audit_a77f141d0dc247acb575541d786cbbf0", + "health": "passed", + "outcome": "failed before provider; missing usage identity", + "harness_deadline_error": "TimeoutError" + }, + { + "database": "inalpha_full_response_audit_5077cb504790429aa7c05c4f294a33fb", + "health": "passed", + "outcome": "failed before provider even with subject persisted in DB; campaign projection omitted it", + "harness_deadline_error": "TimeoutError" + } + ], + "regression": { + "before_fix": "1 failed, KeyError requested_by_sub on real claim", + "after_fix": "1 passed; API schema excludes internal subject", + "test": "services/evolver/tests/test_loop_handoff.py::test_campaign_dispatch_retains_persisted_usage_identity" + }, + "harness": { + "temporary_exploration": true, + "maintained_regression": "Database projection regression only; this full-process harness is not yet part of CI.", + "sha256": { + "run.py": "2b3b79ed145888afc22370d6e3b9a6a9b6b613b4ad16e0b8ee67b58ac69e6088", + "seed.py": "117e1b37aeead4e32a6b6ead115a798955039e8181be70fb83448b757eeb33ac", + "app.py": "d1aa64936654d9562d714c750b84f500069ee1be8498a6cabf9d77a9da928dcf" + } + }, + "limits": [ + "Source process, not same-image container acceptance.", + "Actual complete Evolver lifespan/dispatchers; local mocked signer, credential endpoint, event snapshot and provider transport. Not a complete real Mastra/Dashboard/Data service stack.", + "Synthetic charges are ledger checks, not real provider invoices.", + "No real owner grant, paid search, champion, Forward, holdout or adoption.", + "FDR insufficient rejection does not prove strategy improvement.", + "Cleanup exit -15 is recorded; no graceful shutdown acceptance claim." + ], + "production_new_model_calls": 0, + "production_e2_searches_started": 0, + "automated_checks": { + "full_evolver_suite": { + "passed": 357, + "skipped": 1, + "warnings": 3, + "duration_seconds": 161.73, + "database": "inalpha_campaign_identity_tests_464bad50909b4894a2ad798f9f71e011", + "migration": "fresh upgrade head, 0069; correct wallet/diagnostics chain" + }, + "ruff_check": "passed for both modified files", + "ruff_format": "Existing formatting differences in both files; new test follows formatter; no unrelated reformat.", + "mypy_target": "10 tuple/dict row errors; exact same output with origin/main source shadow, not a passing type check.", + "consistency": "19 passed, 0 failed, 12 existing warnings" + } +}