test-lint-fixer agent charter: constraints, assignment shape, and relationship to lint-fixer #312

Closed
opened 2026-08-07 12:55:15 +00:00 by jared · 1 comment
Owner

Question

What is the test-lint-fixer agent's charter? Assert-preserving constraint wording (it must never change what a test asserts, only style/structure); one assignment file per dispatch (mirroring lint-fixer's fanout shape) vs batch; tool set; what it discloses when a fix would require changing an assertion; and how its charter text relates to lint-fixer's ("never edits tests" stays intact on lint-fixer).

Map: #310

## Question What is the test-lint-fixer agent's charter? Assert-preserving constraint wording (it must never change what a test asserts, only style/structure); one assignment file per dispatch (mirroring lint-fixer's fanout shape) vs batch; tool set; what it discloses when a fix would require changing an assertion; and how its charter text relates to lint-fixer's ("never edits tests" stays intact on lint-fixer). Map: #310
jared self-assigned this 2026-08-07 13:00:54 +00:00
Author
Owner

Resolution (2026-08-07)

Charter: mirror lint-fixer, inverted scope. test-lint-fixer fixes exactly the rubocop offenses in its one assignment file, which must be under test_path; it never touches non-test files. Same mechanics as lint-fixer: per-file assignment via the existing worklist/residual machinery (with a test_path split), verbatim offense list, no ticket context, tools Read/Write/Edit/Glob/Grep/Bash, model sonnet, self-verification via rubocop scoped to its file, disclose interpretations, never ask questions, never delete the assignment file. Behavioral verification is not its job — the stepper's red-assert re-run (per #311) owns that.

Assert-preserving rule: assertion-set invariant. The set of assertions and what each asserts must be identical before and after. Allowed: extract setup into helpers, split one test method into several, rename locals, restructure non-assertion code. Forbidden: add, remove, weaken, or merge assertions.

No refusal path. Deliberately no new gate machinery for disclosed-unfixable offenses — no human-pause row, no auto-todo, no fallback re-dispatch. Provenance check: the #261 deadlock's cause was a staffing gap (no worker allowed in test files), fixed by this agent existing; a genuine refusal under the assertion-set-invariant rule has never been observed and the observed offense classes (MethodLength, ParameterLists, ClassLength, Sdlc cops) are all restructure-fixable. The charter keeps the standard "disclose it, do not change it" escape hatch, but a persisting offense is handled by the stepper's ordinary gate-failure behavior and treated as a root-cause defect — a cop misconfigured for test files, or a bad test — fixed via rubocop config or the lint-rule discovery loop, never worked around in the pipeline.

## Resolution (2026-08-07) **Charter: mirror lint-fixer, inverted scope.** test-lint-fixer fixes exactly the rubocop offenses in its one assignment file, which must be under test_path; it never touches non-test files. Same mechanics as lint-fixer: per-file assignment via the existing worklist/residual machinery (with a test_path split), verbatim offense list, no ticket context, tools Read/Write/Edit/Glob/Grep/Bash, model sonnet, self-verification via rubocop scoped to its file, disclose interpretations, never ask questions, never delete the assignment file. Behavioral verification is not its job — the stepper's red-assert re-run (per #311) owns that. **Assert-preserving rule: assertion-set invariant.** The set of assertions and what each asserts must be identical before and after. Allowed: extract setup into helpers, split one test method into several, rename locals, restructure non-assertion code. Forbidden: add, remove, weaken, or merge assertions. **No refusal path.** Deliberately no new gate machinery for disclosed-unfixable offenses — no human-pause row, no auto-todo, no fallback re-dispatch. Provenance check: the #261 deadlock's cause was a staffing gap (no worker allowed in test files), fixed by this agent existing; a genuine refusal under the assertion-set-invariant rule has never been observed and the observed offense classes (MethodLength, ParameterLists, ClassLength, Sdlc cops) are all restructure-fixable. The charter keeps the standard "disclose it, do not change it" escape hatch, but a persisting offense is handled by the stepper's ordinary gate-failure behavior and treated as a root-cause defect — a cop misconfigured for test files, or a bad test — fixed via rubocop config or the lint-rule discovery loop, never worked around in the pipeline.
jared closed this issue 2026-08-07 13:08:44 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#312
No description provided.