Skip to content

fix: keep client tool sources generic - #2766

Merged
santoshkumarradha merged 2 commits into
santosh/workfrom
fix/client-tools-generic-source
Nov 17, 2026
Merged

santoshkumarradha merged 2 commits into
santosh/workfrom
fix/client-tools-generic-source

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

Summary

Restore the generic client-tool source contract broken by 1788fcb (#2729).

 client_tools.go
- domain-specific explanation of the instruction allowance
+ generic explanation of the instruction allowance
 client_tools_test.go
- domain-specific fixture IDs and rule-size test
+ generic fixture IDs
 tools_workstream_work_test.go
+ unchanged rule-size assertion beside its domain rules

The 8192-byte limit and detailed refusal messages stay intact. The generic-source law is unchanged.

Evidence

  • Before: make test-focus PKGS=./cmd/codeaf RUN='^TestClientToolsSourcesStayGeneric$' fails on internal/session/client_tools.go and internal/session/client_tools_test.go.
    After: the same command passes.
  • git log -S 'workstream' identifies client tools: a set may carry 8192 instruction bytes, and a refusal names the size it saw #2729 as the first introduction in both files; neither file contains the term in its parent.
  • Focused rule-size and refusal tests pass. Full local proof is recorded in a PR comment before merge.

Merge Danger

Door: two-way

Blast Radius: tests

Comments, fixture IDs, and test placement change; runtime behavior does not.

santoshkumarradha and others added 2 commits November 17, 2026 13:22
Move the domain rule-size regression beside its rules and keep generic comments and validator fixtures free of app vocabulary. This repairs TestClientToolsSourcesStayGeneric after #2729 without changing limits or refusals.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
@santoshkumarradha

Copy link
Copy Markdown
Member Author

Local proof for this repair:

  1. Reproduced: make test-focus PKGS=./cmd/codeaf RUN='^TestClientToolsSourcesStayGeneric$' failed at the fetched santosh/work tip 0908ea6, naming internal/session/client_tools.go and internal/session/client_tools_test.go.
  2. Cause: git log -S 'workstream' identifies merge commit 1788fcb, PR client tools: a set may carry 8192 instruction bytes, and a refusal names the size it saw #2729. Both files have zero occurrences in that commit's parent. The unchanged law now passes; TestWorkstreamRulesLeaveRoomInAClientToolSet and TestClientToolSetRefusalNamesTheSize also pass.
  3. Passed: make build; native and Windows make vet stages from make pr-ready BASE=origin/santosh/work; make test-laws (168 files, 47 packages); carried-help and belt-page checks.
  4. Scope review: comments and fixture IDs are generic; the domain rule-size test moved beside its rules with its assertion preserved. The 8192-byte cap, refusal messages, and generic-source test are unchanged. No runtime behavior or manual claims changed.
  5. Broader gate limits: make pr-ready BASE=origin/santosh/work stopped on the existing 101-character title in docs/changes/unreleased/2752-afi-first-workstream.md (also present at the fetched base). A separate manual-gates run failed TestEveryChatManualPageIsReachableByItsOwnName for organization-workstream-tasks; this PR changes neither retrieval code nor manual pages. An earlier manual run was invalidated by my committing the change entry while it ran, so it is not counted as proof. The first touched attempt correctly refused the occupied per-box suite lock; the final run waited for that lock.

Final touched proof: make test-touched BASE=origin/santosh/work exited 0. The session package ran eight shards in 238 seconds. TestStopAfterTheRenderLandedIsToldSoAndTheFileStays failed in the first run and passed the classifier's fresh focused retry (0.826 seconds), so the target reported it as flaky rather than a regression. This is a classified green, not an all-tests-passed-first-time claim.

The requested build, vet, laws, and touched-package proof are complete. Merging under the owner's explicit local-proof/admin policy, without waiting on GitHub CI.

@santoshkumarradha
santoshkumarradha merged commit b297758 into santosh/work Nov 17, 2026
1 check passed
@santoshkumarradha
santoshkumarradha deleted the fix/client-tools-generic-source branch November 17, 2026 18:42
santoshkumarradha added a commit that referenced this pull request Nov 17, 2026
…ide the rules' size cap (L7)

The shared rules may take at most half of an app's instruction allowance (#2766),
and the base already used almost all of it. The brief and the hand-off note are
taught where they apply, on ws_task_create and ws_task_update, which the tests
pin. L6's lease test leaves a hand-off note, as every finished task now does.

Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
ZeroPoint95 pushed a commit that referenced this pull request Nov 24, 2026
Assisted-by: CodeAF
Co-Authored-By: CodeAF <[email protected]>
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