• 三个都是 config_id='default' 单例配置,首次使用即创建、之后原地更新
    (upsert),不需要单独的初始化流程:
    
    - c_concurrency_config_update:新增 src/settings_config.py(
      org_concurrency_config 之前完全没人碰过),校验 max_concurrent_goals
      落在 1-50。
    - c_budget_config_update:budget_guardrail.py 新增 upsert_budget_config()
      ——跟 U-019 已有的 update_budget_limit_and_resume()(只更新已存在的
      行)不是一回事,这个是真正完整的设置页控制器,支持首次创建,沿用
      同一套"额度调高后自动恢复 budget_exceeded 阻塞任务"副作用(提取成
      _resume_budget_blocked_tasks() 共享)。
    - c_log_retention_config_update:同样在 settings_config.py 里,校验
      retention_days > 0。
    
    三处校验都在业务层做完整检查,HTTP 层额外兜了 except (InvalidParamError,
    TypeError)——payload 数值字段缺失时 None<=0 这类比较会抛 TypeError 而
    不是业务异常,两个都要接住才能保证返回干净的 400 而不是裸 500。
    backend_server.py 第一次加了 do_PUT。
    
    前端三个页面共享一个 renderSettingsSubnav() 小组件模拟 02-V 原型里的
    设置下拉菜单。真实服务器端到端验证过三个 PUT/GET 的完整读写循环。
    
    PH3(人机交互控制台)至此全部完成:U-022~U-030。
    
    Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
    bboonnee authored
     
    Browse File »

  • 三个页面需要的读接口此前都不存在,本 Unit 一并建了:
    
    - c_task_list/c_task_get(03-C §3.2,此前无 Unit 认领):新增
      src/task_query.py + GET /api/tasks、GET /api/tasks/:task_id。
      c_task_get 的返回比 03-C 字面契约更完整——额外带上
      work_graph_run(含解析后的 graph_manifest)+ 每个 run 的
      work_node_execution 列表,因为 v_task_detail 的 to-do 树需要这份数据,
      03-C 已订正补全。
    - c_org_loop_route(U-016 已实现 route_org_loop(),从未接 HTTP)第一次
      接上 POST /api/tasks/:task_id/route,v_task_detail 的人工干预
      (manual_resume)按钮需要它。
    - 预算护栏此前没有任何读接口(03-C 只写了 PUT),新增
      budget_guardrail.list_budget_configs() + GET /api/settings/budget
      给仪表盘预算条用。
    
    frontend/app.js 补上真实的 #/(org graph 三节点卡片、当前任务概要、
    预算条、事件时间线,全部通过 c_ws_subscribe 实时刷新)、#/tasks
    (关键字/状态/org_node 过滤)、#/tasks/:task_id(task 字段、to-do 树、
    关联 artifact/bug_record、blocked_pending_human 告警条 + manual_resume
    按钮)。路由改成对象形式支持挂载态清理,切页面时关掉上一个页面的
    WebSocket 连接。v_graph_visualizer/v_log_viewer 子模块明确标成占位
    提示(随 U-026/U-027 补上),不是假造内容。
    
    顺带把 U-023 里因 c_task_list 当时不存在而简化的 related_task_id
    换回真下拉,goal_composer/bug_feedback 提交成功后也改回跳转真实的
    v_task_detail。
    
    Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
    bboonnee authored
     
    Browse File »
  • check_budget(): accumulates current_usage on success (04-P monitoring->
    monitoring), and on reaching/exceeding limit_value transitions the task to
    blocked_pending_human with blocked_reason='budget_exceeded' (never
    'usage_limit_wait_timeout' -- 04-P is explicit these two guardrails, human-
    configured budget vs Claude Code's own plan quota, must not share a
    blocked_reason) and raises BudgetExceededError rather than returning
    allowed=false silently, matching 03-C §3.12's own errors list.
    
    update_budget_limit_and_resume(): REQ-10's boundary case needs "raise the
    limit -> paused tasks resume" to be real; built the minimal version this
    Unit needs rather than the full settings-page controller
    (c_budget_config_update, U-030/PH3's job) -- reuses U-016's manual_resume
    (org_loop_route.route_org_loop) for the actual status restoration instead
    of reimplementing it.
    
    6 new stdlib unittest cases, all real (sqlite, no mocking needed). 173
    total across U-001-019, all passing.
    
    Also: the U-014 full real closed-loop run that's been going in a detached
    background process since earlier this session finished -- 957s (~16min).
    All 4 real BRD/PRD/SDD/Benchmark docs, a real JS snake-game implementation
    (engine.js/engine.test.js/index.html/app.js) from the Coder, and a
    genuinely careful INCONCLUSIVE verdict from the Validator: it explicitly
    refused to accept the Coder's own claimed "10/10 passed, verified with
    headless Chrome" without being able to reproduce it, correctly citing its
    own migrated SOUL.md rule ("工具错误和权限不足属于INCONCLUSIVE,不能洗成PASS").
    It also caught a real test-fidelity gap (T3/T7 not matching the Benchmark's
    literal wording) via careful static tracing. Result preserved at
    /private/tmp/.../scratchpad/snake-game-result for inspection. The Validator
    also reported no Bash tool available despite its frontmatter granting one
    -- investigating that as a follow-up, separate from this commit.
    
    Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
    bboonnee authored
     
    Browse File »