feat(p10-1a-2): add MediaType::Code(lang) variant

TDD: red → green cycle confirmed. New `Code(String)` variant serializes
as `{"code":"rust"}` via serde `rename_all = "lowercase"`. All exhaustive
`match` sites updated (`media_label`, `ingest_one_asset` catch-all →
explicit or-pattern). Design §3.5 enum listing synced. Also fix
`/target` symlink gitignore pattern so integration-test binary lookup
via workspace-relative path works with CARGO_TARGET_DIR redirect.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-19 17:14:45 +00:00
parent 42712b50c2
commit 7a6a24ad10
5 changed files with 24 additions and 1 deletions

View File

@@ -488,6 +488,7 @@ pub enum MediaType {
Pdf,
Image(ImageType),
Audio(AudioType),
Code(String), // p10-1A-2: source-code file; inner = canonical code_lang (e.g. "rust")
Other(String),
}