Repository navigation
feat(browser): 新增 Safe Web readiness 收据(fail-closed 判定) - #71
Merged
Merged
Conversation
…eb-readiness # Conflicts: # README.md # internal/runactivity/activity.go # internal/store/docker_container_io_test.go # internal/store/migration_v102.go # internal/store/sqlite.go
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
issue #41(父任务 #33):Safe Web 产品入口需要在 #1 的 WFP 生产证据通过后接入,且缺少一个统一的"该浏览器此刻是否 ready"判定、把判定变成 CLI/HTTP/Desktop 可消费的持久化事实,以及"启动 → 观察 → 关闭/清理"的操作者编排。
本次改动
browserruntime):BrowserSafeWebReadiness对证据+review 做 fail-closed 判定(12 值 blocking reason),缺失/过期/版本/哈希/策略不匹配一律Ready=false。browser_network_evidences+browser_network_reviews+ 幂等 operation 表;Record/Load幂等回放、取最新、降级重放;PrepareBrowserLaunch/RecordBrowserLaunchReview改为直接返回 browserruntime 类型(消除 application→store 导入环)。BrowserSafeWebRuntimeService.Readiness(收据判定);BrowserRuntimeService.Launch/Close(编排 durable 准备→复核→网络隔离计划→授权→Profile→启动→生命周期协调器→Finalize 关闭/清理)。doctor browser-network-probe写证据、browser-network-review、browser-readiness;只读GET /api/v1/browser/safe-web-readiness;SafeWebReadinessPanel展示 ready/阻塞原因。browserkind,只标记 Go 观察事实。测试覆盖
browserruntime:readiness 12 值 fail-closed;production_runtime_test完整链。store:证据/review 幂等、schema v103 降级重放;launch/review 持久化+权威边界。application:Readiness五路径;BrowserRuntimeService.Launch零身份/未就绪 fail-closed。runactivity:浏览器生命周期投影 Go 观察状态。httpapi:readiness 参数拒绝;OpenAPI golden 一致。web:client 解析、设置页、timeline 图标;typecheck/vitest/build/check:api。验证结果
go build ./...、go vet ./...通过;Go 侧全量go test通过;OpenAPI golden 一致。vite build、check:api通过。doctor browser-readiness无证据时正确返回ready:false+evidence_missing。安全边界与非目标
BrowserRuntimeService都 fail-closed;Launch仅在 readiness、受限 CDP 权限、durable 复核、网络隔离计划、Profile 所有权全部通过后才启动进程,启动前拒绝任何授权放宽。Closes #41