# markitect-main Test Migration Inventory Source repo: `/home/worsch/markitect-main` This inventory classifies old tests and fixtures by the `markitect-tool` FRS. It is a migration filter, not a promise to copy tests verbatim. ## Migration Rule Migrate tests when they verify provider-neutral markdown behavior. Rewrite tests when the old assertion depends on database state, platform lifecycle, UI rendering, domain-specific infospace semantics, or provider-specific LLM calls. ## FR-001/002: Markdown Parsing and Structuring Candidate tests and fixtures: | Source | Use | | --- | --- | | `tests/test_l7_foundation_markdown_parsing.py` | Minimal parser smoke test for heading and paragraph tokens. | | `tests/fixtures/frontmatter_test_files/*.md` | YAML/JSON/TOML/no-frontmatter fixtures. | | `tests/fixtures/content_test_files/*.md` | Frontmatter/content/tailmatter segmentation fixtures. | | `tests/fixtures/markdown_samples.py` | Reusable samples if not coupled to legacy AST shape. | | `testdata/test_frontmatter.md`, `testdata/test_roundtrip.md` | Roundtrip and frontmatter fixtures. | | `tests/test_roundtrip_consolidated.py` | Review for parse/serialize expectations. | | `tests/test_issue_51_outline_mode.py`, `tests/test_issue_52_heading_text_capture.py` | Review for heading tree behavior. | Define the new structured representation first, then port only behavior that still applies. ## FR-010/012: Schema Definition and Validation Strong candidates: | Source | Use | | --- | --- | | `tests/test_schema_loader.py` | Markdown schema load/save/roundtrip, frontmatter extraction, JSON extraction, edge cases. | | `tests/test_issue_5_schema_generation.py` | Schema derivation from simple/complex markdown, depth limits, empty/file-not-found behavior. | | `tests/test_issue_7_schema_validation.py` | Matching/non-matching schemas, invalid inputs, depth-limited schema validation. | | `tests/test_issue_8_validation_errors.py` | Structured validation errors, formatting, summaries, file/string inputs. | | `tests/test_schema_metaschema.py` | Metaschema validation fixtures. | | `tests/test_schema_naming.py` | Migrate only if schema naming remains part of the contract. | | `markitect/schemas/*.md`, `markitect/schemas/markitect-metaschema.json` | Candidate fixtures, not automatically built-in product schemas. | Do not migrate database-backed schema ingest/list/get/delete behavior. ## FR-020/022: Transformation and Composition Candidate tests: | Source | Use | | --- | --- | | `tests/test_issue_150_transclusion_engine.py` | Includes, variables, conditionals, circular references, depth limits, partial errors. | | `tests/test_issue_149_explode_implode_variants.py` | Review explode/implode variants as transform primitives. | | `tests/unit/infospace/test_composition.py` | Extract only generic markdown composition expectations. | | `tests/unit/spaces/test_transclusion.py` | Extract only generic transclusion rules. | Rewrite around a small operation API. Avoid importing `infospace`, `spaces`, or packaging semantics into the toolkit core. ## FR-030/031: Query and Extraction Candidate tests: | Source | Use | | --- | --- | | `tests/test_l4_service_ast_analysis.py` | AST display/query/stats behavior and JSONPath error handling. | | `markitect/query_paradigms/tests/test_query_paradigms.py` | Review for adapter boundary ideas only. | | `markitect/graphql/tests/*` | Do not migrate; GraphQL service is out of scope. | Initial query tests should cover selector matches, empty matches, invalid selectors, and structured output over parsed documents. ## FR-040/042: Templating and Generation Strong candidates: | Source | Use | | --- | --- | | `tests/test_issue_65_template_parser.py` | Variable detection, nested variables, duplicates, malformed braces, empty templates. | | `tests/test_issue_65_template_substitution.py` | Strict/lenient substitution, nested data, markdown formatting, special characters, large templates. | | `tests/test_issue_6_stub_generation.py` | Review for schema-to-markdown stub generation. | Do not migrate prompt execution or LLM quality gates into core. FR-042 should be an optional adapter hook after deterministic generation works. ## FR-050/052: CLI, Batch, and Repeatability Candidate tests: | Source | Use | | --- | --- | | `tests/test_issue_17_batch_processing.py` | File discovery, recursion, depth limits, glob behavior, stop/continue errors. | | `tests/test_cli_simple.py`, `tests/test_cli_integration.py`, `tests/test_issue_6_cli_integration.py` | Review command ergonomics only; command names change to `mkt`. | | `tests/test_l4_service_output_formatting.py` | Structured output formatting expectations. | Rewrite around new `mkt` commands. Do not keep database ingest/status/list as first-class behavior. ## FR-060/061: Configuration Handling Strong candidates: | Source | Use | | --- | --- | | `tests/test_issue_18_config_management.py` | Config show/set/init/validate/help, YAML/JSON parsing, env vars, sensitive masking. | | `tests/test_issue_37_configuration_integration.py` | Review for config precedence if not provider-specific. | Drop LLM provider preference handling from core config. ## FR-070/071: Caching and Incremental Processing Candidate tests: | Source | Use | | --- | --- | | `tests/test_l5_infrastructure_cache_management.py` | Cache stats/clean/invalidate behavior and feedback. | | `markitect/ast_cache.py`, `cache_service.py` | Reference after parser representation stabilizes. | Do not migrate prompt incremental recompute tests. ## FR-080/081: Structured Errors Candidate tests: | Source | Use | | --- | --- | | `tests/test_issue_8_validation_errors.py` | Highest-value source for typed validation failures and formatting. | | `tests/test_issue_152_153_edge_cases.py` | Review for generic edge cases. | | `markitect/exceptions.py`, `validation_error.py` | Reference for error taxonomy. | Structured errors should be introduced early because they shape CLI and API behavior across all FRS areas. ## Explicitly Out of Scope Do not migrate: - `tests/unit/infospace/*`, except tiny generic markdown composition ideas. - `tests/unit/spaces/*`, except generic transclusion ideas. - `tests/unit/prompts/*`, `tests/integration/prompts/*`. - `tests/unit/llm/*`, `tests/integration/llm/*`. - Asset/package/rendering/plugin/browser/editor/theme tests. - `markitect/finance/tests/*`, profile tests, legacy management tests, wishlist/project tooling tests. ## First Test Migration Slice Start with parser/frontmatter fixtures, `tests/test_schema_loader.py`, `tests/test_issue_7_schema_validation.py`, `tests/test_issue_8_validation_errors.py`, template parser/substitution tests, and batch discovery tests without database processors.