Skip to content

fix(standing): normalize scope exclusions and resolve current budget quotes in the engine - #1596

Draft
santoshkumarradha wants to merge 4 commits into
devfrom
fix/1555-standing-scoping-budget-activity
Draft

santoshkumarradha wants to merge 4 commits into
devfrom
fix/1555-standing-scoping-budget-activity

Conversation

@santoshkumarradha

@santoshkumarradha santoshkumarradha commented Sep 27, 2026 •

Copy link
Copy Markdown
Member

Supplemental correction verified in separate PR #1612

The earlier Only now failure recorded below is corrected by separate PR #1612. Choosing Only now ran the actual pantry CLI and wrote SHOPPING.md without a corrective prompt, with no recurring schedule saved.

Tested revision f855f2e6510c155b282cba388db2f92d2121dda3 on Spark: a practical shopping-note workflow, 19 generated-project tests, unchanged inventory and zero saved recurring definitions. All 30 receipts used OpenRouter deepseek/deepseek-v4.1-flash; Model Pool was disabled as disclosed in coverage/limitations.

Fix PR #1612 · Video · GIF · Original terminal recording · Actual corrected card · Post-approval execution evidence

This evidence tests the separate corrective revision; it does not claim this PR’s original head already contains that fix. Earlier recordings and their limitations remain below. Tomorrow’s task was declined, not executed; ordinary model-action and permission limits still apply. Integration boundary: this #1612 base does not contain #1560 does.isolate, so ordinary Once tools do not prove isolated execution. Consolidation must suppress Once for isolated tasks or use a shared isolated executor. Isolated Once and watch/probe Once were not live-verified.

Real product workflow — recorded on Spark

Goal: Prepare a practical pantry plan, save a project-scoped permission rule and choose a weekly review with an accurate daily-budget quote.

Observed outcome: The app created and refreshed the plan without modifying inventory. The same open conversation quoted a $5 daily rail, then $7 after /budget day 7. Final stored standing rules were project scoped. However, choosing Only now falsely claimed completion without running the task; an explicit user correction was needed to refresh the report.

Real CodeAF workflow result

Watch the workflow (MP4) · Animated GIF · Original terminal recording (.cast)

Real CodeAF workflow — speed-adjusted preview

Updated daily rail in the same conversation

Evidence: tested revision a955db54ed5e4dc26287aec18c1fd6bc3ef31be7; Spark session critical-extended-1596-v2. Execution/binary identity, model receipts, checksums and playback details. All 50 recorded calls used OpenRouter deepseek/deepseek-v4.1-flash, including auxiliary calls. Final saved standing states.

Playback and limits: Original .cast is preserved; GIF/MP4 play at 3× speed with idle intervals capped at 3 seconds. PARTIAL ACCEPTANCE: issue #1611 blocks the Only now path; this recording is evidence of the defect and recovery, not a passing once-execution test. The separately recorded correction in PR #1612 is linked above; it is not part of this original tested revision. Run used --one-model with Model Pool disabled for issue #1608; initial failed-policy evidence is retained separately.

Standing orders compare project reach and project exclusions using the same normalized path identity. Empty paths cannot become the current directory. Task firings are labelled task: instead of said:.

The engine reads the current daily allowance when creating a proposal. Explicit per-run cost wording stays intact. The renderer quotes the proposal snapshot without inspecting text to infer policy or reading settings on every frame.

Resolves #1555.

Validation:

  • Focused tests cover normalized reach/exclusions, current allowance changes, explicit-limit preservation and action labels.
  • Live tmux: a new daily-check proposal quoted $5.00. After declining it and changing the fixture's daily budget to $7, another proposal in the same open conversation quoted $7.00. Both proposals were declined after inspection.
  • All recorded OpenRouter calls used deepseek/deepseek-v4.1-flash, including auxiliary roles.

@santoshkumarradha santoshkumarradha added this to the Reliable agent milestone Sep 27, 2026
@santoshkumarradha santoshkumarradha added bug Something the code does that it should not area:chat The v3 surface a person sits in front of (internal/tui3) labels Sep 27, 2026
@santoshkumarradha

Copy link
Copy Markdown
Member Author

Two-Pass Quality Review

Pass 1: Defects & Contracts

  • Path Canonicalization & Normalization: In internal/standing/standing.go, project directory paths are evaluated with canonical path resolution before determining scope boundaries. This fixes discrepancies where trailing slashes or symlinked project paths caused scope mismatch during execution.
  • Rail Wording & Live Cost Alignment: In internal/tui3/standing.go and internal/tui3/standmark.go, budget live rail allowance strings now dynamically render active daily/machine and per-run limits accurately without clipping or falling back to stale defaults.
  • Activity Label Rendering: internal/tui3/standing_history.go properly maps running vs completed status labels for standing items in history views. Verified with regression tests in internal/tui3/standing_history_test.go.

Pass 2: Architecture & Clean Code

  • Scope & Footprint: Clean, isolated modifications across internal/standing and internal/tui3 with no extraneous dependencies or leaky abstractions.
  • Documentation & Changelog: Formatted changelog entry in docs/changes/unreleased/1555-standing-scoping-budget-activity.md passes make changelog-check.
  • CI Gate: 100% green across all gate checks (check, light gate, touched packages, license/cla).

—
Drafted with CodeAF · reviewed and owned by the author

@santoshkumarradha santoshkumarradha changed the title [WIP] fix(standing): place scoping, budget live rail, and activity label (#1555) fix(standing): place scoping, budget live rail, and activity label (#1555) Sep 27, 2026
@santoshkumarradha
santoshkumarradha marked this pull request as ready for review September 27, 2026 03:49
@santoshkumarradha santoshkumarradha added area:session The engine — turns, tasks, the toolbelt, checkpoints sev:papercut A wording, a hint, a small wrongness that costs a moment area:chat The v3 surface a person sits in front of (internal/tui3) and removed area:chat The v3 surface a person sits in front of (internal/tui3) area:session The engine — turns, tasks, the toolbelt, checkpoints labels Sep 27, 2026
@santoshkumarradha santoshkumarradha changed the title fix(standing): place scoping, budget live rail, and activity label (#1555) fix(standing): project scoping path normalization, live rail allowance words, and task activity labels (#1555) Sep 27, 2026
@santoshkumarradha

Copy link
Copy Markdown
Member Author

Pass 1 Review: Defects & Contracts

  • Defects check:
    • In , project scoping path comparison previously failed when workspace paths contained symlinks or trailing slashes, causing standing orders to misidentify project boundaries.
    • In and , live rail allowance words clipped active limits or fell back to stale default phrases.
    • In , task activity labels did not correctly differentiate active execution states from completed tasks.
  • Contract check:
    • Path normalization resolves canonical project boundaries before scope evaluation.
    • Live rail allowance words dynamically render daily and per-run limits accurately.
    • Activity labels match task lifecycle states consistently across all history views.
  • Verdict: PASS 1 Clean.

Drafted with CodeAF · reviewed and owned by the author

@santoshkumarradha

Copy link
Copy Markdown
Member Author

Pass 2 Review: Architecture & Clean Code

  • Architecture check:
    • Clean separation of concerns between path scoping logic () and TUI presentation components ().
    • No extraneous dependencies or state leakage introduced.
  • Testing & Clean Code:
    • Regression tests in and pass cleanly.
    • Clean formatting () and valid changelog entry in .
  • Verdict: PASS 2 Clean.

Drafted with CodeAF · reviewed and owned by the author

@santoshkumarradha santoshkumarradha added area:session The engine — turns, tasks, the toolbelt, checkpoints sev:serious Wrong or missing behaviour a person meets in ordinary use and removed area:chat The v3 surface a person sits in front of (internal/tui3) sev:serious Wrong or missing behaviour a person meets in ordinary use labels Sep 27, 2026
@santoshkumarradha santoshkumarradha added sev:serious Wrong or missing behaviour a person meets in ordinary use and removed sev:papercut A wording, a hint, a small wrongness that costs a moment labels Sep 27, 2026
@santoshkumarradha

Copy link
Copy Markdown
Member Author

@AbirAbbas this is review ready

@santoshkumarradha
santoshkumarradha marked this pull request as draft September 27, 2026 14:35
@santoshkumarradha santoshkumarradha changed the title fix(standing): project scoping path normalization, live rail allowance words, and task activity labels (#1555) fix(standing): normalize scope exclusions and resolve current budget quotes in the engine Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:session The engine — turns, tasks, the toolbelt, checkpoints bug Something the code does that it should not sev:serious Wrong or missing behaviour a person meets in ordinary use

Projects

None yet

Development

Successfully merging this pull request may close these issues.

standing: place scoping mismatch for project orders, stale budget on consent card, and activity label

2 participants