Plan code base audit remediation - #52
Conversation
Import the latest Rust agent instructions and align the documentation index with the current style-guide structure. Add the canonical repository layout reference so contributors have one source of truth for path ownership and fixture locations. Run the Markdown formatter across the documentation set so existing prose continues to satisfy the repository documentation gates.
Add the execution plan for the 2026-06-05 code base audit remediation work and index it from the documentation contents. Record the validation gates, CodeRabbit review outcome, related follow-up issues, and approval boundary before implementation begins.
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Reviewer's GuideAdds a new execution plan for remediating a recent code base audit, wires it into the documentation index, tightens repository/agent guidance around abstractions, testing, and documentation, and introduces a canonical repository layout doc plus minor doc cleanups. Flow diagram for the approval-gated code base audit ExecPlanflowchart TD
A[Audit findings 2026-06-05] --> B[ExecPlan code-base-audit-2026-06-05.md]
B --> C[User explicitly approves implementation]
C --> D[Milestones 1-8 implemented]
D --> E[Repo gates make fmt/lint/test]
E --> F[coderabbit review --agent]
F --> G[Audit remediation complete]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Update the living ExecPlan after pushing the plan branch and opening the draft pull request so the progress checklist reflects the current review state.
Add shared integration fixture helpers for theorem files and diagnostics, then migrate duplicated BDD and schema tests to use them. Add googletest and pretty_assertions as test-only dependencies so new helper coverage uses the requested assertion styles. Document the reusable testing pattern in the developers guide and record Milestone 1 validation plus CodeRabbit review status in the ExecPlan.
Update the audit ExecPlan with the Milestone 1 implementation commit after the fixture-helper refactor passed deterministic documentation gates.
Move canonical action-name grammar and typed validation reasons into a neutral theoremc-core module shared by schema validation and mangling. Change identifier-sensitive mangle APIs to accept CanonicalActionName or return InvalidCanonicalActionName from checked string entry points. Update collision detection, macro probe rendering, behavioural tests, and property tests to use the checked boundary. Document the shared-domain pattern in the developers guide and record Milestone 2 validation in the audit ExecPlan.
Update the audit ExecPlan with the canonical action-name milestone implementation commit after validation and CodeRabbit review were completed.
Store action signature keys and action-call targets as `CanonicalActionName` instead of `String`, so invalid action names are rejected during raw-to-domain conversion rather than during late validation or code generation. Update collision detection, macro action probes, and tests to consume the new domain type. Add raw conversion coverage for invalid `Actions` keys and action-call names, and document the raw schema boundary in the developer guide and ExecPlan.
Mark the canonical action-name domain migration as committed in the ExecPlan after the implementation commit, deterministic gates, and CodeRabbit review completed successfully.
Return typed validation paths and reason kinds from semantic schema validation, then render public diagnostics at the loader boundary. Map those paths through the raw schema adapter so source locations no longer depend on parsing human-readable error strings. Document the validation diagnostic boundary in the developer guide and record Milestone 4 progress, local gate evidence, and the repeated CodeRabbit sandbox-preparation blocker in the ExecPlan.
There was a problem hiding this comment.
Gates Failed
New code is healthy
(1 new file with code health below 10.00)
Enforce advisory code health rules
(2 files with String Heavy Function Arguments, Code Duplication)
Our agent can fix these. Install it.
Gates Passed
4 Quality Gates Passed
Reason for failure
| New code is healthy | Violations | Code Health Impact | |
|---|---|---|---|
| canonical_action_name.rs | 1 rule | 9.69 | Suppress |
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| collision.rs | 1 advisory rule | 10.00 → 9.39 | Suppress |
| canonical_action_name.rs | 1 advisory rule | 9.69 | Suppress |
Quality Gate Profile: Pay Down Tech Debt
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Summary
docs/execplans/code-base-audit-2026-06-05.mdas the approval-gated plan for the 2026-06-05 code base audit remediation.docs/contents.md.Review Notes
This PR is intentionally plan-only. Implementation is blocked on explicit approval of the ExecPlan.
The plan covers the requested work around canonical action-name newtypes, checked mangling APIs, typed validation diagnostics, schema serde boundaries, schema default documentation, macro query/render separation, fixture helper consolidation, Rustdoc examples, and duplicated deserialization boilerplate.
Validation
make fmtmake check-fmtmake markdownlintmake nixiemake lintmake testcoderabbit review --agentexited successfully on retry with no finding payload.Summary by Sourcery
Add an execution plan for addressing 2026-06-05 code base audit findings and expand repository and contribution documentation to guide future implementation and abstractions.
Enhancements:
Documentation: