Skip to content

fix(dev): 解禁非安全门禁,保留真正安全底线 - #75

Merged
avabbbb merged 3 commits into
mainfrom
fix/dev-unlock-gates
Oct 8, 2026
Merged

avabbbb merged 3 commits into
mainfrom
fix/dev-unlock-gates

Conversation

@avabbbb

@avabbbb avabbbb commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

背景

近期 main 的 reviewability / CI / branch guard 把大量“信息不完整”或“开发环境不够整洁”的情况升级成 hard block,实际造成 Agent Run、审核卡和日常开发频繁死锁。

本 PR 的原则:

信息质量问题只提示,不阻塞;真正可能造成错误副作用的状态继续 fail-closed。

产品审核解禁

降级为 warning,不再阻止确认

以下 review packet 缺项仍显示在卡片上,但 reviewability.status 保持 ready:

  • missing_before
  • missing_after
  • missing_why
  • missing_evidence
  • missing_current_source
  • 普通操作 missing_scope
  • 未绑定独立 Ask 的计划组
  • 无人消费的显式 AUTO 组

前端会显示「信息提示,不影响确认」,批准 / 拒绝按钮继续可用。docs/02-interaction-design.md 同步加入 D-9:审阅质量缺项只能提示,不能制造无出口状态。

Prepare 不再掉进无人执行的 AUTO 黑洞

L1 / prepare 默认投影为普通可确认 review。若显式 AUTO 没有执行器,也降级成可确认项而不是把 Run 永久停住。

仍然 hard block 的安全底线

以下没有放开:

  • source 已变化 / snapshot stale
  • Plan / Group digest 不匹配
  • executing / uncertain / failed 等执行状态不明,需要 reconciliation
  • 明确的 policy BLOCK
  • destructive operation 缺 scope
  • destructive / external operation 仍要求明确 authorization
  • Operation Registry、幂等、审计、effect verification、持久化授权绑定全部保留

开发 Guard 解禁

branch_guard.py:

  • start / integrate / pr:落后 main、dirty worktree、命名分支超预算 → warning
  • owner-test:最新 baseline + clean worktree 继续 hard fail
  • 本地“三条分支”改为 advisory budget,不再因为多 Agent / 多 worktree 施工而阻塞

AGENTS.md 同步更新规则。

CI 解禁

普通 PR 改成快速通道:

  • 新增 changed-path 分类
  • backend / frontend / agent-runtime / extension / tauri 仅在相关路径变动时运行
  • release claims / readiness / version / architecture audit 不在普通 PR 重复跑
  • npm audit 在受影响路径的普通 PR 上仍会运行并报告,但失败不阻塞;main/tag/release 仍严格
  • RustSec 在相关 PR 上是 advisory;main/tag 继续严格
  • browser smoke / 10x repeatability / failure-recovery / previous-release migration / Windows & macOS packaging / installed-app smoke 仅 main / tag / manual release 跑
  • branch freshness 变成 advisory,不再挡 PR

main / tag / release 的严格发布门槛保持不变。

Tests

新增 / 更新:

  • backend/tests/test_agentic_interaction_policy.py
    • incomplete packet 可确认
    • missing source metadata 只警告
    • captured stale source 仍阻塞
    • destructive scope / authorization 仍是硬底线
    • prepare / ASK / AUTO 均有用户出口
  • backend/tests/test_branch_guard.py
    • start / integrate / pr advisory
    • owner-test 仍严格
  • PlanReviewInbox.test.tsx
    • warning 可见但批准按钮仍可用
  • docs/02-interaction-design.md
    • S-2 / D-9 明确“质量提醒不阻塞,真实安全边界才阻塞”

说明

本 PR 不处理 SQLite reset 锁、resume proposal 全部确认后仍停在 in_review 等独立产品 bug;这些应继续单独修,避免把行为修复和门禁政策混在一起。

未 merge,等待评审。

@avabbbb
avabbbb merged commit 644f40b into main Oct 8, 2026
14 of 15 checks passed
@avabbbb
avabbbb deleted the fix/dev-unlock-gates branch October 8, 2026 16:25
avabbbb added a commit that referenced this pull request Oct 9, 2026
* fix(reset): cancel each live worker once during quiesce

cancel_career_task already cancels a career task's live worker; the
follow-up _cancel_task_objects cancelled it again. The second cancel could
land inside the worker's final awaited DB commit, orphaning an open SQLite
write transaction (RESERVED lock) so the reset's checkpoint hit
'database is locked' after the 30s busy timeout. Flaky on main too.
Skip tasks that already have a pending cancellation; still await them.

(cherry picked from commit b15017f56941cf75c7fcd4ccaea5a557fe4b20d7)

* feat(resume): finalize a proposal when its last decision group is confirmed

Confirming every resume decision group left the proposal 'in_review' with
no accepted ResumeVersion. A confirmed decision-plan node now finalizes the
proposal in the same review transaction once no change is pending: snapshot
the workspace as a ResumeVersion and mark it accepted through
mark_workspace_proposal_accepted, the helper now shared with
create_resume_version_record (all-rejected closes it as 'rejected').
Idempotent, and a replayed final review finalizes a fully reviewed but
unfinalized proposal. Direct workspace reviews keep the existing contract:
the proposal stays open until the user saves a version.

Drop the strict xfail on
test_tailor_resume_fixture_runs_ask_plan_receipts_and_workspace_on_one_run.

(cherry picked from commit 42203d951c84987cf42d2d4d2ccd61a31e969482)

* test(career): pin automation-event lookups to the test's own target (shared DB order leak)

(cherry picked from commit 5da56feb4e06495782e8662759ea0e11c40d1e0e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant