Private
Public Access
0
0

fix identation track.

This commit is contained in:
2026-05-16 02:34:52 -04:00
parent 11c9aab685
commit 9d40fec46e
4 changed files with 118 additions and 0 deletions
+6
View File
@@ -269,3 +269,9 @@ This file tracks all major tracks for the project. Each track has its own detail
- [x] **Track: Fix 45 failing test files across 12 batches**
*Link: [./tracks/fix_test_suite_failures_20260514/](./tracks/fix_test_suite_failures_20260514/)*
---
- [ ] **Track: Fix Indentation 1-Space Convention**
*Link: [./tracks/fix_indentation_1space_20260516/](./tracks/fix_indentation_1space_20260516/)*
*Goal: Standardize all Python files to 1-space indentation per AI-Optimized Python Style Guide. Audit and correct indentation in src/, tests/, scripts/, and conductor/ directories.*
@@ -0,0 +1,10 @@
{
"id": "fix_indentation_1space_20260516",
"title": "Fix Indentation 1-Space Convention",
"type": "fix",
"status": "planned",
"priority": "high",
"created": "2026-05-16",
"depends_on": [],
"blocks": []
}
@@ -0,0 +1,51 @@
# Implementation Plan: Fix Indentation 1-Space Convention
## Phase 1: Audit and Classification
Focus: Identify all files requiring indentation correction
- [ ] Task 1.1: Create indentation audit script to scan all Python files
- File: `scripts/audit_indentation.py`
- Detect: Lines with leading whitespace that is not a multiple of 1 space
- Output: List of files with line numbers and current indentation level
- [ ] Task 1.2: Run audit against src/ directory (51 files)
- File: src/
- Categorize: Files with 0 issues, 1-10 issues, 10+ issues
- [ ] Task 1.3: Run audit against tests/ directory
- File: tests/
- [ ] Task 1.4: Run audit against scripts/ directory
- File: scripts/
- [ ] Task 1.5: Run audit against conductor/ directory
- File: conductor/
## Phase 2: Correct Indentation - src/ Files
Focus: Fix identified files in src/ (in order of severity)
- [ ] Task 2.1: Fix src/ files with 1-10 indentation issues
- [ ] Task 2.2: Fix src/ files with 10+ indentation issues
- [ ] Task 2.3: Verify syntax after each file fix
- [ ] Task 2.4: Commit each file individually
## Phase 3: Correct Indentation - tests/ Files
Focus: Fix identified files in tests/
- [ ] Task 3.1: Fix tests/ files with indentation issues
- [ ] Task 3.2: Verify syntax after each file fix
- [ ] Task 3.3: Commit each file individually
## Phase 4: Correct Indentation - scripts/ Files
Focus: Fix identified files in scripts/
- [ ] Task 4.1: Fix scripts/ files with indentation issues
- [ ] Task 4.2: Verify syntax after each file fix
- [ ] Task 4.3: Commit each file individually
## Phase 5: Correct Indentation - conductor/ Files
Focus: Fix identified files in conductor/
- [ ] Task 5.1: Fix conductor/ Python files with indentation issues
- [ ] Task 5.2: Verify syntax after each file fix
- [ ] Task 5.3: Commit each file individually
@@ -0,0 +1,51 @@
# Track Specification: Fix Indentation 1-Space Convention
## Overview
Standardize all Python files in the project to use exactly 1-space indentation per the AI-Optimized Python Style Guide. This is a remediation track to correct any files that have drifted from the convention, ensuring consistent formatting across the entire codebase without using auto-formatters (which risk corrupting non-indentation formatting).
## Current State Audit (as of 29244acc)
### Already Implemented (DO NOT re-implement)
- **src/imgui_scopes.py:1-259** — Uses 1-space indentation correctly
- **src/cost_tracker.py:1-64** — Uses 1-space indentation correctly
- **src/paths.py:1-220** — Uses 1-space indentation correctly
- **conductor/code_styleguides/python.md** — Documents the 1-space indentation requirement
### Gaps to Fill (This Track's Scope)
- **src/ directory** — Need to audit all 51 Python files for compliance
- **tests/ directory** — Need to audit test files for compliance
- **scripts/ directory** — Need to audit utility scripts for compliance
- **conductor/ directory** — Need to audit conductor Python files for compliance
## Goals
1. Identify all Python files not using 1-space indentation
2. Correct indentation to 1-space in all non-compliant files
3. Preserve all other formatting (comments, docstrings, alignment)
4. Never use auto-formatters (ruff --fix, black, etc.)
## Functional Requirements
- [ ] Audit every .py file in src/, tests/, scripts/, and conductor/
- [ ] For each file, detect if it uses any indentation other than 1 space
- [ ] For non-compliant files, surgically correct only the indentation
- [ ] Preserve comment positioning, docstring formatting, and alignment
- [ ] Commit each file correction individually
## Non-Functional Requirements
- **No Auto-Formatters:** User explicitly requested manual correction only
- **Preservation Priority:** Other formatting must not be disturbed
- **Atomic Commits:** Each file correction as a separate commit for safe rollback
- **Syntax Safety:** Verify syntax after each file correction
## Architecture Reference
- conductor/code_styleguides/python.md#section-1 (Indentation and Whitespace)
## Out of Scope
- Re-formatting code for any other style concerns
- Auto-correction of any kind
- Changes to .toml, .md, or non-Python files