# codebase-verification

> Every algorithm contract in this domain is listed with its position on the derivation loop, its intent and invariant, the flow it walks, its productions as a…

Page: Ontology · Algorithms
Canonical: https://banes-lab.com/ontology/algorithms#algo-domain-codebase-verification

Every algorithm contract in this domain is listed with its position on the derivation loop, its intent and invariant, the flow it walks, its productions as a grammar, what it composes and is composed by, which forces and principles it answers to, what grounds it and what it grounds, and an exemplar where the record carries one. The diagram shows what composes what inside the domain.

Relations diagram

What composes what inside this domain.

```mermaid
flowchart LR
n_verification_loop["Verification Loop"]
n_context_initialization["Context Initialization"]
n_verification_execution["Verification Execution"]
n_early_success_exit["Early Success Exit"]
n_violation_classification["Violation Classification"]
n_severity_ordered_remediation["Severity-Ordered Remediation"]
n_iteration_bound["Iteration Bound"]
n_file_scoped_fix["File-Scoped Fix"]
n_file_limit_remediation["File Limit Remediation"]
n_import_boundary_remediation["Import Boundary Remediation"]
n_naming_convention_remediation["Naming Convention Remediation"]
n_base_class_compliance_remediation["Base-Class Compliance Remediation"]
n_css_token_remediation["CSS Token Remediation"]
n_dom_factory_remediation["DOM Factory Remediation"]
n_console_usage_remediation["Console Usage Remediation"]
n_lifecycle_symmetry_remediation["Lifecycle Symmetry Remediation"]
n_stylelint_post_fix["Stylelint Post-Fix"]
n_reverification_gate["Reverification Gate"]
n_partial_success_reporting["Partial Success Reporting"]
n_completion_report["Completion Report"]
n_codebase_verification_kernel["Codebase Verification Kernel"]
n_compliance_verification_concern["<Compliance Verification Concern>"]
n_verification_loop --> n_violation_classification
n_context_initialization --> n_iteration_bound
n_reverification_gate --> n_verification_execution
n_codebase_verification_kernel --> n_context_initialization
n_codebase_verification_kernel --> n_verification_execution
n_codebase_verification_kernel --> n_violation_classification
n_codebase_verification_kernel --> n_iteration_bound
n_codebase_verification_kernel --> n_file_scoped_fix
n_codebase_verification_kernel --> n_reverification_gate
n_codebase_verification_kernel --> n_completion_report
n_codebase_verification_kernel --> n_severity_ordered_remediation
```

### Verification Loop

- Stage: [verify](https://banes-lab.com/records/stage/verify.md)
- Axis: [verification](https://banes-lab.com/records/reason/axis-verification.md)
- Math type: [dynamical-systems](https://banes-lab.com/records/reason/math-type-dynamical-systems.md)
- Yields: boolean | counter

Details

Intent
Initialize verification context, execute the verification suite, classify failures, remediate violations, and repeat until pass or iteration limit.

Invariant
Architectural compliance is achieved through bounded verify-classify-fix cycles, not one-shot remediation.

Flow

```text
Init → Verify → Classify → Fix → Reverify → Pass|Limit
```

Productions

```bnf
VerificationLoop ::= <Initialization> "->" <VerificationRun> "->" (<PassReport> | <ViolationClassification> "->" <RemediationCycle> "->" <VerificationLoop>)
LoopExit ::= "passed" | "max_iterations_reached"
```

Composes
[Violation Classification](https://banes-lab.com/records/algo/violation-classification.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A one-shot fix attempt, unverified — some violations remain, and neither the developer nor the model notices.
```

After

```text
init → verify → classify failures → fix → re-verify → repeat until pass or iteration limit
```

### Context Initialization

- Stage: [orient](https://banes-lab.com/records/stage/orient.md)
- Axis: [ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
Discover architecture documents, load design guidance, initialize result containers, set iteration counters, and define maximum remediation attempts.

Invariant
Verification requires a known rule context before failures can be interpreted.

Flow

```text
DiscoverRules → LoadGuidance → InitializeState → SetBounds
```

Productions

```bnf
ContextInitialization ::= <RuleDiscovery> "->" <GuidanceLoad> "->" <VerificationState> "->" <IterationBound>
VerificationState ::= "verification_results" "," "iteration_count" "," "max_iterations"
```

Composes
[Iteration Bound](https://banes-lab.com/records/algo/iteration-bound.md)

Composed by
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Named in the derivation of
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Forces
[runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
Failures interpreted with no known rule context, so fixes miss the point.
```

After

```text
discover architecture docs + design guidance → init result containers + iteration counter + max attempts
```

### Verification Execution

- Stage: [verify](https://banes-lab.com/records/stage/verify.md)
- Axis: [verification](https://banes-lab.com/records/reason/axis-verification.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
Run the configured verification procedure, capture raw output, parse errors and warnings, and derive pass status from zero-error condition.

Invariant
Compliance status must be based on executable verification output, not inferred confidence.

Flow

```text
ExecuteSuite → CaptureOutput → ParseErrors → ParseWarnings → PassBoolean
```

Productions

```bnf
VerificationExecution ::= <VerificationCommand> "->" <RawOutput> "->" <ParsedResult>
ParsedResult ::= <ErrorSet> "," <WarningSet> "," <PassStatus>
PassStatus ::= "errors.length == 0"
```

Composes
none

Composed by
[Reverification Gate](https://banes-lab.com/records/algo/reverification-gate.md), [Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Named in the derivation of
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
[ver-evidence](https://banes-lab.com/records/reason/node-ver-evidence.md)

Before

```text
Compliance asserted from confidence, not from the verifier's output.
```

After

```text
run verification suite → capture raw output → parse errors + warnings → pass = errors.length == 0
```

### Early Success Exit

- Stage: [terminate](https://banes-lab.com/records/stage/terminate.md)
- Axis: [termination](https://banes-lab.com/records/reason/axis-termination.md)
- Math type: [set-theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- Yields: set | boolean

Details

Intent
If verification has no errors, report successful compliance and terminate without remediation.

Invariant
A clean verification result is terminal and must not trigger unnecessary mutation.

Flow

```text
VerificationResult → IsPass? → ReportSuccess|Continue
```

Productions

```bnf
EarlyExit ::= <ParsedResult> "->" <PassCheck> "->" <SuccessReport>
PassCheck ::= "true" | "false"
SuccessReport ::= "zero_violations"
```

Composes
none

Forces
[state_transaction](https://banes-lab.com/records/force/state-transaction.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A clean verification result still triggers unnecessary remediation.
```

After

```text
parsed result → is pass? → report zero-violations success and terminate, no mutation
```

### Violation Classification

- Stage: [derive](https://banes-lab.com/records/stage/derive.md)
- Axis: [reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
For each verification error, classify the violation into a known remediation category and attach the matching strategy.

Invariant
Fixes must be selected by violation semantics, not by ad hoc text editing.

Flow

```text
Error → Category → Strategy
```

Productions

```bnf
ViolationClassification ::= <ErrorSet> "->" <CategorizedViolationSet>
Category ::= "file_limit" | "import_pattern" | "naming" | "base_class" | "css_token" | "dom_factory" | "console" | "lifecycle" | "unknown"
CategorizedViolation ::= <Error> "," <Category> "," <RemediationStrategy>
```

Composes
none

Composed by
[Verification Loop](https://banes-lab.com/records/algo/verification-loop.md), [Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Named in the derivation of
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
Errors fixed by ad hoc text editing, not by their semantics.
```

After

```text
each error → category{file_limit | import | naming | base_class | css_token | dom_factory | console | lifecycle} → matching strategy
```

### Severity-Ordered Remediation

- Stage: [intent](https://banes-lab.com/records/stage/intent.md)
- Axis: [teleology](https://banes-lab.com/records/reason/axis-teleology.md)
- Math type: [optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- Yields: boolean | ranking

Details

Intent
Group classified violations by category, order groups by severity, and apply fixes from highest architectural risk to lowest.

Invariant
Remediation should resolve structural blockers before cosmetic or secondary violations.

Flow

```text
CategorizedViolations → SeveritySort → OrderedFixQueue
```

Productions

```bnf
SeverityOrdering ::= <ViolationCategorySet> "->" <SeverityRank> "->" <OrderedViolationQueue>
SeverityRank ::= "critical" | "high" | "medium" | "low"
```

Composes
none

Named in the derivation of
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
[tel-priority](https://banes-lab.com/records/reason/node-tel-priority.md)

Before

```text
A cosmetic warning fixed before a structural blocker.
```

After

```text
classified violations → group by category → order by severity → fix highest architectural risk first
```

### Iteration Bound

- Stage: [terminate](https://banes-lab.com/records/stage/terminate.md)
- Axis: [termination](https://banes-lab.com/records/reason/axis-termination.md)
- Math type: [dynamical-systems](https://banes-lab.com/records/reason/math-type-dynamical-systems.md)
- Yields: boolean | counter

Details

Intent
Increment iteration count before remediation, compare it to the maximum allowed attempts, and stop with partial success when the bound is exceeded.

Invariant
Automated remediation must be bounded to avoid infinite repair loops.

Flow

```text
Increment → CompareLimit → Continue|PartialExit
```

Productions

```bnf
IterationBound ::= <IterationCount> "->" <Increment> "->" <LimitCheck> "->" <LoopDecision>
LoopDecision ::= "continue_remediation" | "stop_manual_review_required"
```

Composes
none

Composed by
[Context Initialization](https://banes-lab.com/records/algo/context-initialization.md), [Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Named in the derivation of
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
[ter-stop](https://banes-lab.com/records/reason/node-ter-stop.md)

Before

```text
Automated remediation loops forever on an unfixable violation.
```

After

```text
increment iteration → compare to max → {continue | stop, manual review required}
```

### File-Scoped Fix

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Read the violating file, analyze the violation type, transform content according to design guidance, write the updated content, and preserve compatibility with verification rules.

Invariant
Each fix is a localized transformation constrained by architectural guidance.

Flow

```text
ReadFile → AnalyzeViolation → Transform → WriteFile
```

Productions

```bnf
FileScopedFix ::= <Violation> "->" <FileRead> "->" <ViolationAnalysis> "->" <DesignGuidedTransformation> "->" <FileWrite>
DesignGuidedTransformation ::= <CurrentContent> "," <ViolationType> "," <DesignGuide> "->" <UpdatedContent>
```

Composes
none

Composed by
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Named in the derivation of
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A fix edits broadly, breaking things the verifier didn't flag.
```

After

```text
violation → read file → analyze → transform per design guidance → write updated content
```

### File Limit Remediation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
When a file exceeds the allowed size, split responsibilities into smaller compliant artifacts, preserve imports and exports, and rewire references.

Invariant
Size violations usually indicate excessive responsibility concentration.

Flow

```text
OversizedFile → ResponsibilitySplit → NewArtifacts → ReferenceUpdate → SizeCheck
```

Productions

```bnf
FileLimitFix ::= <OversizedArtifact> "->" <ResponsibilityPartition> "->" <ArtifactSplit> "->" <ReferenceRewrite> "->" <LineLimitValidation>
LineLimitValidation ::= "line_count <= configured_limit"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
An oversized file trimmed by deleting code instead of splitting responsibility.
```

After

```text
oversized file → split responsibilities into compliant artifacts → preserve imports/exports → rewire references → size <= limit
```

### Import Boundary Remediation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Detect invalid cross-boundary imports, locate the approved dependency path or shared abstraction, rewrite imports, and verify dependency direction.

Invariant
Import fixes must restore architectural boundaries rather than merely silence errors.

Flow

```text
InvalidImport → BoundaryRule → ApprovedPath → RewriteImport → DependencyCheck
```

Productions

```bnf
ImportBoundaryFix ::= <ImportViolation> "->" <BoundaryPolicy> "->" <AllowedReference> "->" <ImportRewrite> "->" <DependencyValidation>
BoundaryPolicy ::= "same_module_only" | "shared_boundary_required" | "adapter_boundary_required"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A cross-boundary import error silenced without restoring the boundary.
```

After

```text
invalid import → boundary rule{same-module | shared | adapter} → approved path → rewrite → verify dependency direction
```

### Naming Convention Remediation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Compare file, folder, class, or symbol names against naming rules, derive compliant names, rename artifacts, and update all references.

Invariant
Naming remediation requires identity migration, not isolated renaming.

Flow

```text
InvalidName → NamingRule → NewName → Rename → ReferenceUpdate
```

Productions

```bnf
NamingFix ::= <NamingViolation> "->" <NamingConvention> "->" <CompliantIdentifier> "->" <RenameOperation> "->" <ReferenceConsistencyCheck>
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)

Grounds
none

Before

```text
A file renamed but its references left dangling.
```

After

```text
invalid name → naming rule → compliant identifier → rename → update all references (identity migration)
```

### Base-Class Compliance Remediation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Detect classes missing required base abstraction, refactor inheritance or composition according to role rules, migrate duplicated lifecycle logic into hooks, and verify behavior remains represented.

Invariant
Base-class violations are architectural adoption failures.

Flow

```text
NonCompliantClass → ExpectedBase → RefactorExtension → HookMigration → Verify
```

Productions

```bnf
BaseClassFix ::= <ClassRole> "->" <ExpectedBaseAbstraction> "->" <InheritanceOrCompositionUpdate> "->" <LifecycleHookMigration> "->" <ComplianceCheck>
ComplianceCheck ::= "class_extends_expected_base" | "uses_required_composition_boundary"
```

Composes
none

Forces
[semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A class missing its required base 'fixed' by silencing the rule.
```

After

```text
class role → expected base → refactor inheritance/composition → migrate duplicated lifecycle into hooks → verify behavior represented
```

### CSS Token Remediation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Replace hardcoded style values with approved design tokens, verify token availability, and run style validation.

Invariant
Presentation constants should resolve through design-system tokens.

Flow

```text
HardcodedStyle → TokenLookup → Replacement → StyleValidation
```

Productions

```bnf
CssTokenFix ::= <HardcodedStyleValue> "->" <DesignTokenResolution> "->" <TokenReplacement> "->" <StyleValidation>
DesignTokenResolution ::= "existing_token" | "new_token_required" | "manual_review_required"
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A hardcoded color left in place, the rule disabled instead.
```

After

```text
hardcoded style value → resolve design token{existing | new | manual review} → replace → style validation
```

### DOM Factory Remediation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Replace direct DOM manipulation with the approved DOM factory, component factory, or rendering abstraction.

Invariant
DOM creation must flow through the sanctioned construction boundary.

Flow

```text
DirectDOM → FactoryBoundary → Rewrite → BehaviorCheck
```

Productions

```bnf
DomFactoryFix ::= <DirectDomUsage> "->" <ApprovedCreationBoundary> "->" <FactoryRewrite> "->" <LifecycleCompatibilityCheck>
DirectDomUsage ::= "document.querySelector" | "document.createElement" | "innerHTML" | "direct_event_binding"
```

Composes
none

Forces
[modularity](https://banes-lab.com/records/force/modularity.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [object_creation](https://banes-lab.com/records/force/object-creation.md)

Grounds
none

Before

```text
Direct document.createElement kept, the rule ignored.
```

After

```text
direct DOM{querySelector, createElement, innerHTML, direct event} → approved creation boundary → factory rewrite → lifecycle check
```

### Console Usage Remediation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Replace direct console calls with the approved logging abstraction, preserve severity and message context, and verify no direct console usage remains.

Invariant
Observability should be centralized behind a logging contract.

Flow

```text
ConsoleCall → LoggerMapping → Replacement → SearchNoConsole
```

Productions

```bnf
ConsoleFix ::= <ConsoleUsage> "->" <LoggerSeverityMapping> "->" <LoggerReplacement> "->" <ConsoleAbsenceCheck>
LoggerSeverityMapping ::= "console.log->info" | "console.warn->warn" | "console.error->error"
```

Composes
none

Forces
[contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md), [semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md), [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md), [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md), [event_messaging](https://banes-lab.com/records/force/event-messaging.md)

Grounds
none

Before

```text
A console.log left in and the rule bypassed.
```

After

```text
console call → logger severity mapping{log->info, warn->warn, error->error} → replace → verify no direct console remains
```

### Lifecycle Symmetry Remediation

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Detect resources created without corresponding cleanup, add destroy or teardown paths, and verify create/destroy symmetry.

Invariant
Lifecycle compliance requires every acquired resource to have a release path.

Flow

```text
AcquireResource → MissingRelease? → AddCleanup → SymmetryCheck
```

Productions

```bnf
LifecycleFix ::= <LifecycleViolation> "->" <AcquiredResourceSet> "->" <CleanupRequirementSet> "->" <DestroyPathUpdate> "->" <SymmetryValidation>
SymmetryValidation ::= "created_resources == destroyed_resources"
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A resource acquired with no release path, leaking.
```

After

```text
lifecycle violation → acquired resources → add destroy/teardown → verify created == destroyed
```

### Stylelint Post-Fix

- Stage: [act](https://banes-lab.com/records/stage/act.md)
- Axis: [formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
After remediation, run style validation, parse style errors, apply style-specific corrections, and block re-verification until style checks pass or are reported.

Invariant
Syntax and style conformance must be restored before the next architectural verification cycle.

Flow

```text
Remediation → Stylelint → StyleErrors? → FixStyle → Continue
```

Productions

```bnf
StylePostValidation ::= <RemediatedArtifacts> "->" <StyleValidationRun> "->" (<StylePass> | <StyleFixCycle>)
StyleFixCycle ::= <StyleErrorSet> "->" <StyleCorrectionSet> "->" <StyleValidationRun>
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
The next architectural cycle runs on style-broken code.
```

After

```text
remediation → run style validation → fix style errors → block re-verification until style passes
```

### Reverification Gate

- Stage: [verify](https://banes-lab.com/records/stage/verify.md)
- Axis: [verification](https://banes-lab.com/records/reason/axis-verification.md)
- Math type: [logic](https://banes-lab.com/records/reason/math-type-logic.md)
- Yields: boolean

Details

Intent
After fixes and style validation, rerun the full verification suite rather than trusting local corrections.

Invariant
Only the authoritative verification suite can confirm global compliance.

Flow

```text
FixesApplied → LocalValidation → FullVerification
```

Productions

```bnf
ReverificationGate ::= <RemediationResult> "->" <PostFixValidation> "->" <VerificationExecution>
```

Composes
[Verification Execution](https://banes-lab.com/records/algo/verification-execution.md)

Composed by
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
[ver-evidence](https://banes-lab.com/records/reason/node-ver-evidence.md)

Before

```text
Local corrections trusted as global compliance.
```

After

```text
fixes applied → local validation → rerun the full authoritative verification suite
```

### Partial Success Reporting

- Stage: [commit](https://banes-lab.com/records/stage/commit.md)
- Axis: [representation](https://banes-lab.com/records/reason/axis-representation.md)
- Math type: [information-theory](https://banes-lab.com/records/reason/math-type-information-theory.md)
- Yields: hash | novelty-score

Details

Intent
When iteration bounds are exhausted, report remaining violations, categorize unresolved issues, and mark the result as requiring manual review.

Invariant
Bounded automation should fail visibly with actionable residue.

Flow

```text
MaxIterations → RemainingViolations → ManualReviewReport
```

Productions

```bnf
PartialSuccessReport ::= <IterationLimitReached> "->" <RemainingViolationSet> "->" <ManualReviewRequired>
ManualReviewRequired ::= "remaining_errors" "," "remaining_warnings" "," "blocked_categories"
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
Iteration bound hit and the run silently reports success.
```

After

```text
max iterations → remaining violations categorized → mark result manual-review-required (visible, actionable residue)
```

### Completion Report

- Stage: [commit](https://banes-lab.com/records/stage/commit.md)
- Axis: [representation](https://banes-lab.com/records/reason/axis-representation.md)
- Math type: [information-theory](https://banes-lab.com/records/reason/math-type-information-theory.md)
- Yields: hash | novelty-score

Details

Intent
Report total iterations, fixed error count, remaining warnings, and final verification status.

Invariant
Completion output should separate fixed violations from tolerated or remaining warnings.

Flow

```text
FinalState → Iterations → FixedCount → WarningCount → Report
```

Productions

```bnf
CompletionReport ::= <FinalVerificationState> "," <IterationCount> "," <FixedCount> "," <RemainingWarningCount>
FinalVerificationState ::= "passed" | "partial_success" | "failed"
```

Composes
none

Composed by
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Named in the derivation of
[Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

Before

```text
A report that mixes fixed violations with tolerated warnings.
```

After

```text
final state → {total iterations, fixed count, remaining warnings, final status{passed | partial | failed}}
```

### Codebase Verification Kernel

- Math type: [computation](https://banes-lab.com/records/reason/math-type-computation.md)
- Yields: procedure

Details

Intent
Load compliance context, run verification, parse results, exit on pass, classify violations on failure, remediate by severity, run post-fix style validation, and repeat until zero errors or iteration limit.

Invariant
Codebase verification is a bounded remediation state machine driven by authoritative compliance output.

Flow

```text
Context → Verify → Parse → Pass? → Classify → Fix → StyleValidate → Reverify → Report
```

Productions

```bnf
CodebaseVerificationKernel ::= <ContextInitialization> "->" <VerificationExecution> "->" (<EarlyExit> | <ViolationClassification> "->" <IterationBound> "->" <SeverityOrdering> "->" <FileScopedFix> "->" <StylePostValidation> "->" <ReverificationGate>) "->" <CompletionReport>
SuccessCondition ::= "verification_errors == 0"
FailureBound ::= "iteration_count > max_iterations"
```

Composes
[Context Initialization](https://banes-lab.com/records/algo/context-initialization.md), [Verification Execution](https://banes-lab.com/records/algo/verification-execution.md), [Violation Classification](https://banes-lab.com/records/algo/violation-classification.md), [Iteration Bound](https://banes-lab.com/records/algo/iteration-bound.md), [File-Scoped Fix](https://banes-lab.com/records/algo/file-scoped-fix.md), [Reverification Gate](https://banes-lab.com/records/algo/reverification-gate.md), [Completion Report](https://banes-lab.com/records/algo/completion-report.md)

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
[derivation-loop](https://banes-lab.com/ontology/reasoning/reason-loop-derivation-loop.md)

Derivation map

orient
[Context Initialization](https://banes-lab.com/records/algo/context-initialization.md)

derive
[Violation Classification](https://banes-lab.com/records/algo/violation-classification.md)

intent
[Severity-Ordered Remediation](https://banes-lab.com/records/algo/severity-ordered-remediation.md)

act
[File-Scoped Fix](https://banes-lab.com/records/algo/file-scoped-fix.md)

verify
[Verification Execution](https://banes-lab.com/records/algo/verification-execution.md)

commit
[Completion Report](https://banes-lab.com/records/algo/completion-report.md)

terminate
[Iteration Bound](https://banes-lab.com/records/algo/iteration-bound.md)

Before

```text
Compliance claimed after one edit, never re-verified.
```

After

```text
context → verify → parse → pass? → classify → severity-order fix → style validate → reverify → repeat until zero errors or bound
```

### <Compliance Verification Concern>

- Meta record

Details

Intent
<Load rules> → <Run authoritative verifier> → <Parse failures> → <Classify by violation type> → <Apply bounded fixes> → <Run local post-fix validation> → <Rerun verifier> → <Exit on pass or bound>

Invariant
Any programmatic compliance workflow should be treated as a bounded verification-remediation loop whose only completion signal is the authoritative verifier passing.

Flow

```text
Rules → Verify → Errors → Categories → Fixes → LocalValidation → Reverify → Report
```

Productions

```bnf
ComplianceConcern ::= <RuleContext> "->" <AuthoritativeVerification> "->" <ViolationRegistry> "->" <RemediationQueue> "->" <BoundedMutationCycle> "->" <Reverification> "->" <FinalStatus>
FinalStatus ::= "passed" | "partial_success_manual_review" | "failed"
```

Composes
none

Forces
[correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)

Grounds
none

## Links to

- [Verify](https://banes-lab.com/records/stage/verify.md)
- [Verification](https://banes-lab.com/records/reason/axis-verification.md)
- [Dynamical Systems](https://banes-lab.com/records/reason/math-type-dynamical-systems.md)
- [Violation Classification](https://banes-lab.com/records/algo/violation-classification.md)
- [correctness_verification](https://banes-lab.com/records/force/correctness-verification.md)
- [Orient](https://banes-lab.com/records/stage/orient.md)
- [Ontology](https://banes-lab.com/records/reason/axis-ontology.md)
- [Set Theory](https://banes-lab.com/records/reason/math-type-set-theory.md)
- [Iteration Bound](https://banes-lab.com/records/algo/iteration-bound.md)
- [Codebase Verification Kernel](https://banes-lab.com/records/algo/codebase-verification-kernel.md)
- [runtime_extensibility](https://banes-lab.com/records/force/runtime-extensibility.md)
- [Logic](https://banes-lab.com/records/reason/math-type-logic.md)
- [Reverification Gate](https://banes-lab.com/records/algo/reverification-gate.md)
- [Ver Evidence](https://banes-lab.com/records/reason/node-ver-evidence.md)
- [Terminate](https://banes-lab.com/records/stage/terminate.md)
- [Termination](https://banes-lab.com/records/reason/axis-termination.md)
- [state_transaction](https://banes-lab.com/records/force/state-transaction.md)
- [Derive](https://banes-lab.com/records/stage/derive.md)
- [Reasoning](https://banes-lab.com/records/reason/axis-reasoning.md)
- [Verification Loop](https://banes-lab.com/records/algo/verification-loop.md)
- [semantic_consistency](https://banes-lab.com/records/force/semantic-consistency.md)
- [Intent](https://banes-lab.com/records/stage/intent.md)
- [Teleology](https://banes-lab.com/records/reason/axis-teleology.md)
- [Optimisation](https://banes-lab.com/records/reason/math-type-optimisation.md)
- [Tel Priority](https://banes-lab.com/records/reason/node-tel-priority.md)
- [Context Initialization](https://banes-lab.com/records/algo/context-initialization.md)
- [Ter Stop](https://banes-lab.com/records/reason/node-ter-stop.md)
- [Act](https://banes-lab.com/records/stage/act.md)
- [Formalisation](https://banes-lab.com/records/reason/axis-formalisation.md)
- [Computation](https://banes-lab.com/records/reason/math-type-computation.md)
- [contract_compatibility](https://banes-lab.com/records/force/contract-compatibility.md)
- [modularity](https://banes-lab.com/records/force/modularity.md)
- [architecture_evolution](https://banes-lab.com/records/force/architecture-evolution.md)
- [object_creation](https://banes-lab.com/records/force/object-creation.md)
- [observability_traceability](https://banes-lab.com/records/force/observability-traceability.md)
- [event_messaging](https://banes-lab.com/records/force/event-messaging.md)
- [Verification Execution](https://banes-lab.com/records/algo/verification-execution.md)
- [Commit](https://banes-lab.com/records/stage/commit.md)
- [Representation](https://banes-lab.com/records/reason/axis-representation.md)
- [Information Theory](https://banes-lab.com/records/reason/math-type-information-theory.md)
- [File-Scoped Fix](https://banes-lab.com/records/algo/file-scoped-fix.md)
- [Completion Report](https://banes-lab.com/records/algo/completion-report.md)
- [The derivation loop](https://banes-lab.com/ontology/reasoning/reason-loop-derivation-loop.md)
- [Severity-Ordered Remediation](https://banes-lab.com/records/algo/severity-ordered-remediation.md)
