Skip to content

Separate scoped Attempt acceptance from Task completion and let Chief select the next delivery - #2537

Merged
zy95-12 merged 8 commits into
ThinkFlowLab:delivery/ai-centric-development-servicefrom
zy95-12:fix/2526-chief-delivery-options
Nov 5, 2026
Merged

zy95-12 merged 8 commits into
ThinkFlowLab:delivery/ai-centric-development-servicefrom
zy95-12:fix/2526-chief-delivery-options

Conversation

@zy95-12

@zy95-12 zy95-12 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Written-by: Codex

Fixes #2526. Target: delivery/ai-centric-development-service.

A merged PR no longer forces completion of its whole Task. Chief can explicitly accept the current Attempt with completed scope, evidence and remaining work. The committed receipt requests a fresh Chief judgement; Chief may then choose a new Attempt from the verified current target SHA containing the accepted merge, preserving Task-role context and old PR history while allocating a new publication identity. Whole-Task closure retains the existing criteria, dependency and input gates.

The actual Chief job receives scoped legal prechecks at projectFacts.tasks[].repositoryRecovery.nextActions and continuationOptions. Public TaskView.nextActions remains the caller's service-command list; TaskView.deliveryChoices projects the same decision prechecks. A board listing only chief.inspect does not limit Chief to inspection. Stale facts require a reread, and a rejected rework never authorizes clearing publicationBinding. Host facts/preconditions can suggest legal choices; Chief selects the action. Personal Agent → human remains the last resort chosen by Chief.

Repeated Chief refusals under the same delivery scope reuse the existing configurable no-progress threshold and task-attention warning path. Summaries disclose at most five exact current failed actions. Changed facts or resolved reasons retire the old warning, so current legal choices do not conflict with historical refusals. No new timer, counter store, planner, fixed role sequence or automatic human escalation.

Current authority, snapshot, candidate/test/independent Review/provider merge, exit and external-write guards remain in force. Save failure rolls back provisional acceptance; original Effects/scheduler/quotas/request receipts provide replay, restart and failed-admission handling. Updated memory, architecture, API/OpenAPI, decision, changelog and canonical mirrors; original context budget retained.

Validation (current head c0fcf9d7a916921f0b932b8140098dd34feceaaa):

  • Base-red reproducer; additional meaningful reds for principal revocation, queued TaskView and repeated Chief refusals.
  • Final-head full root verify: 5128 passed, 0 failed, including 8 actual DSH runtime checks. Lint/architecture ownership, generated builds, canonical patches, API/OpenAPI and regression stages all passed.
  • Five affected suites: 257/0 on 2ed6f54 (same delivery execution logic); final-source Chief/options/warnings refinement: 92/0, API:10/0, original role-budget:6/0. Final doc-only commit archives duplicate evidence links verbatim; production/test code equals 8377946. The actual two-turn Chief context test asserts both legal actions and disambiguation from board commands.
  • Measured coverage: shipping-head shared helper line100/branch96.19/function100%; Chief92.58/76.48/79.81; warnings98.43/80.68/87.23 in the 92-test refinement run. The 257-test delivery run measured Delivery96.77/79.52/86.67, TaskView95.27/79.47/76.19, ReviewedMerge100/84.42/96 (line/branch/function). These are whole-module measurements, not 100% added-branch claims. Helper defaults/shortcircuit variants and existing broad-module branches remain unexecuted; covered critical cases include stale/missing evidence, exact failures, revoked rights, unknown exit, rollback, target advancement/squash/missing objects, pending writes and duplicate/restart recovery. No coverage exclusions or weaker assertions.
  • Pairing self-review covers correctness, security and conventions; no independent Verifier PASS is claimed. Owner-authorized basic delivery-branch CI, no policy/protection changes.
  • Earlier final-core run had an ENOTEMPTY cleanup hook failure in unchanged remote-room.test.js; reasoned full rerun passed. First CI had an unchanged role-GitHub FIFO credential test timeout. Final-head CI attempt1 had one unchanged native group restart wait-condition failure; isolated probe1/0, failed jobs rerun with evidence retained. The final-head role-budget growth failure was repaired by verbatim archival of duplicate historical reference links, preserving the 384000-byte cap and required rules; budget6/0 and full verify now pass. CI Test run 42040426463, attempt2 passed on the exact final head: Node24 and tests-ok both success. No assertion, credentials or CI policy weakened.

Provenance/limits: real Git, actual Runtime/Store restart and OS SDK-protocol subprocess fixtures demonstrate two Dev→Tester→Reviewer deliveries and distinct PR identities; these are deterministic fixtures, not vendor-model/onsite acceptance. Owner explicitly deferred broader mandatory-context-package cleanup to separate work. No live OpenToday mutation, deploy/restart, external provider writes or paid inference. Approved exact target Git objects must be provisioned; missing objects expose scoped repository/branch/SHAs rather than arbitrary fetch or host-HEAD fallback.

@zy95-12
zy95-12 marked this pull request as ready for review November 5, 2026 14:06
@zy95-12
zy95-12 merged commit a809a7a into ThinkFlowLab:delivery/ai-centric-development-service Nov 5, 2026
15 of 19 checks passed
zy95-12 added a commit that referenced this pull request Nov 5, 2026
Written-by: Codex

Fixes #2526 (follow-up to #2537). Target:
`delivery/ai-centric-development-service`.

After Chief revised a Task to rev3/rev4, its already merged rev2 Attempt
could never be accepted: both the advisory precheck and execution
applied whole-Task requirement equality. Scoped acceptance now judges
the pinned Attempt definition and its exact
code/test/Review/provider-merge evidence while leaving the Task open.
Settlement records both original and current revisions; an explicitly
chosen next Attempt uses the current requirements. Historical parent
settlement also looks up the original durable child admission using the
pinned parent revision; child evidence and the committed admission
remain mandatory. Whole-Task closure retains its independent
current-goal checks.

Chief/TaskView receive the same bounded comparison: revisions, changed
fields, prior values, and the existing paged requirement source. Changes
after a Chief snapshot use existing stale-snapshot correction. Prior
refusal messages describe past outcomes, not current action legality.
Candidate evidence, identity, permissions, execution generations, exits,
pending writes and replay/rollback guards remain strict. No new
workflow, timer, store, migration or automatic human escalation.

Validation:
- Fresh base `056cb557`: the corrected persisted-Task fixture fails the
real Git/Runtime rev2→rev4 settlement/next-delivery path, actual Chief
loop and advisory projection on the old requirement-equality guard; all
three pass after the fix.
- Final-head related suites: **281 passed / 0 failed**; the final actual
Chief loop also passes with four historical same-fact refusal records.
It sees legal scoped acceptance, accepts rev2, keeps Task open and
explicitly starts rev4. New stale-judgement regression returns
correction without blocking the Task or consulting a human.
- Preserved negative coverage for mutated candidate/evidence,
provider/rights/exit failures, changed requirements during I/O and
incomplete whole-Task acceptance. Role budget **6/0**, API/OpenAPI
**10/0**. Self-review also reproduced and repaired the child-admission
revision barrier; targeted parent/evolution/Chief/negative admission
regressions: **5/0**. **Final-head full root verification: 5167 passed /
0 failed**, including **8 actual DSH runtime checks**. [GitHub Test
42053449199](https://github.com/ThinkFlowLab/FlyBot/actions/runs/42053449199),
attempt1: final-head Node24 / tests-ok both success.
- Measured broad coverage (whole modules): shared helper **100% lines /
99.25% branches / 100% functions**; Chief 96.96/85.56/80.18; Delivery
96.91/79.74/86.67. This is not a 100% added-branch claim; unexecuted
helper ranges include queue.reason null fallback, direct
missing-candidate shortcircuit, and the new advisory prior-value
empty-string fallback. The latter cannot authorize an action and the
original full requirement remains queryable. No added source line
appears in the Node uncovered-line list; that is not proof of every
added branch combination. No exclusions or weakened evidence assertions.
- Updated compact long-term memory, delivery/Chief/backend architecture,
API/OpenAPI, decision, changelog and canonical mirrors. Original context
cap/source list unchanged. Broader mandatory-context slimming stays
separately deferred.
- Pairing self-review covered correctness, security and conventions; no
independent Verifier PASS claimed. Final source:
`1f8cff3abcaad9ccf91ebb0a7b0980c4307deae0`.

Not run: live OpenToday deployment/restart/state or binding edits,
external provider writes, paid model inference, or a real vendor
SDK/model on this new evolution path. Runtime/SDK-protocol subprocess
fixtures do not establish onsite acceptance. Source preserves #2527
Feishu integration.
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