Skip to content

Lint C++ header contracts and table-driven native test cases - #231

Merged
dayfine merged 5 commits into
agentsfrom
lint/cpp-header-test-contracts
Nov 5, 2026
Merged

dayfine merged 5 commits into
agentsfrom
lint/cpp-header-test-contracts

Conversation

@dayfine

@dayfine dayfine commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Base: agents. This draft changes the fork's canonical Code Health tooling and coding rules only. It is separate from the C++ changes in #227; never merge the agents branch into a code branch.

Code Health now checks namespace closing labels, comments on namespace-scope header symbols, public template API declarations before implementation helpers, with internal helpers defined in place, and structured native test cases. New/changed UnitTest classes receive a case with separate input and expectation structs and register a named table of designated rows. Untouched legacy declarations remain grandfathered.

How to review

Read the new structural sections in style.py, their negative/positive self-tests, and the CLI integration. All rules share the existing style entry point, lexer and parsed statements; no separate contracts.py or second parsing pass remains. It is a structural check, not a C++ type checker; the README spells out supported tables and the limits around external fixture types/macros.

Validation

All 112 linter tests pass when CODE_HEALTH_REPO points to the code checkout; Agents Check CI passes (its notes-only checkout has one expected skip). Harness and standing-rule checks pass. The candidate gate rejects the original #227 with structural findings and passes its revised header/tests with zero findings. Each new rule has a captured red test followed by a passing counterpart. #227 also switches its old branch-local CI to the canonical agents linter workflow; merge this draft to activate these rules there and in the normal pre-push gate.

@dayfine
dayfine marked this pull request as ready for review November 5, 2026 19:45
@dayfine
dayfine merged commit 3a66893 into agents Nov 5, 2026
1 check passed
@dayfine
dayfine deleted the lint/cpp-header-test-contracts branch November 5, 2026 19:45
dayfine added a commit that referenced this pull request Nov 5, 2026
- Add descriptive header symbol comments and matching namespace close comments
- Forward-declare public function templates before their definitions
- Convert native unit tests to input/expectation table-driven cases
dayfine added a commit that referenced this pull request Nov 5, 2026
- Add descriptive header symbol comments and matching namespace close comments
- Forward-declare public function templates before their definitions
- Convert native unit tests to input/expectation table-driven cases
dayfine added a commit that referenced this pull request Nov 5, 2026
Clean up namespace closing comments, namespace-scope symbol documentation,
and refactor unit tests to table-driven TestCase scenarios.
dayfine added a commit that referenced this pull request Nov 6, 2026
dayfine added a commit that referenced this pull request Nov 6, 2026
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