Skip to content

Latest commit

 

History

History
25 lines (14 loc) · 2.27 KB

ANALYSIS.md

File metadata and controls

25 lines (14 loc) · 2.27 KB

Analysis model and artifact safety

Codebase Colony 0.3.0 preserves RepositoryAnalysis schema version 2 and adds optional/additive fields. Existing city layout and workflow behavior therefore remain compatible while richer analyzers can disclose their origin and partial state.

Source analyzers

JavaScript and TypeScript are parsed with the pinned TypeScript compiler parser. The analyzer walks the syntax tree for static import/export specifiers, literal require and dynamic imports, exported declarations, functions, classes, and decision points. It creates no program, resolves no tsconfig, loads no plugins, and executes no project code.

Python, Java, Go, and Rust use independent bounded static plugins for common imports, visible declarations, and decision signals. They are intentionally conservative initial analyzers, not compiler-semantic models. Unsupported or unreadable text falls back to metadata or a disclosed partial heuristic instead of failing the repository scan.

Existing artifacts

The app only checks fixed conventional paths for:

  • coverage-summary JSON and Istanbul coverage JSON;
  • LCOV and Cobertura coverage;
  • JUnit XML and Jest/Vitest JSON results.

Each artifact is limited to 8 MiB, symbolic-link artifacts are ignored, record counts are capped, unsafe XML declarations are rejected, and artifact paths cannot escape the selected repository model. Conflicting coverage sources are averaged and all contributing artifact names are disclosed in survey notes. A parsed failure is labeled confirmed because it came from a result artifact, not because Codebase Colony ran or independently verified the test.

Git and derived trends

Git history uses argument arrays without a shell, detects renames, and reads at most 501 commits so it can explicitly identify a partial 500-commit window. Trend persistence stores only bounded derived snapshots and active mission IDs under Electron’s userData directory. Git repositories are keyed by an opaque hash of root history and configured origin; non-Git folders use an opaque canonical-path hash. Unrelated repositories do not share a timeline.

Run npm run profile:analysis for a reproducible synthetic 1,500-file source/dependency profile. Set COLONY_PROFILE_FILES between 100 and 6,000 to exercise a different analysis size.