Why: N1 WP5/WP6 library side - the gate decision logic, artifact
checks, verdict parsing and progress-reminder throttling move from
the product into a gates package behind ports, and the native backend
gains a contract form so conformance has a real implementation to
drive.
Evidence: go vet clean; go test ./... 27 packages ok, including the
conformance suite (succeeded/descriptor/error-sideeffects) against
the real backend.
Impact: new runtime/gates package (ClaimGate, CheckArtifacts,
ParseVerdict, ProgressReminder, shared caps); adapters/native.Backend
gains Contract() returning an exec.ContractBackend wrapper - the
legacy facade keeps its signature so squad consumption is untouched.
Product texts (fix prompts, verifier prompts) stay injected by hosts.
Refs: Documents proposal 2026-10-07-agent-stack-n1q1i1-plans.md WP5/WP6
weichen
merged commit 0d8edbea52 into main2026-10-07 06:21:01 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
N1 增量四(库侧):门禁机制下沉 + 契约后端适配(WP5/WP6)
按 Documents 提案
2026-10-07-agent-stack-n1q1i1-plans.md§2.2 落地 WP5/WP6 的库侧部分。改动
runtime/gates(WP5 机制下沉):ClaimGate:deliverableGate 的正则族(forgedCall/artID/fileClaim/softClaim)与判定逻辑(producedIDs/knownExisting)逐字下沉;CheckArtifacts:checkDeliverables 逐字下沉(存在/非空/.md/.txt/.docx 评分与原因格式);ParseVerdict(+stripFence)下沉;ProgressReminder:进度提醒的节流状态机与格式化(文案与现网一致);共享常量MaxDeliverableGuards=2 / MaxVerifyContinuations=3 / ReminderToolGap=3 / MaxChecklistReminders=3。ArtifactLookup/QualityScorer/ArtifactRef/probe 注入未完成项);产品专属文本(纠正提示、验证器提示词)留宿主注入——库只持机制。adapters/native.Backend.Contract()(WP6):以包装类型实现exec.ContractBackend(旧门面Execute(ctx, exec.Request)与契约签名冲突,包装使 squad 现有消费零影响;旧门面不动)。映射:空ToolPolicy.Profile→reasoning(契约注释语义)、Workspace.Root→WorkDir、Allowlist/预算/事件帧映射;Outcome/Err/SideEffects 规整(取消→Canceled、截止→deadline_exceeded、其余→Failed+explicit SideEffects;传输级→Unknown)。conformance.Suite首次获得真实实现调用方:succeeded_minimal / descriptor_has_name / error_sideeffects_explicit 三例在真实 native 后端上通过(脚本化模型注入)。验证
go vet ./...通过;go test -count=1 ./...27 包全 ok。主任务:Dev 仓
feature/agent-stack-n1。