2026-02-11 01:17:58 +01:00
|
|
|
# Markitect Infrastructure Tasks
|
|
|
|
|
|
|
|
|
|
Issues discovered while building the infospace-with-history example.
|
2026-02-11 22:54:37 +01:00
|
|
|
All three have been fixed in commit `706981c` and the pipeline script
|
|
|
|
|
refactored to use the fixed infrastructure directly.
|
2026-02-11 01:17:58 +01:00
|
|
|
|
2026-02-11 22:54:37 +01:00
|
|
|
## 1. Artifact Repository does not store content — RESOLVED
|
2026-02-11 01:17:58 +01:00
|
|
|
|
|
|
|
|
**File:** `markitect/prompts/resolver/resolver.py`, line 147-148
|
|
|
|
|
**Issue:** `content = f"[Content of {artifact.name} from {space_id}]"` — the
|
|
|
|
|
resolver returns placeholder text instead of actual artifact content because
|
|
|
|
|
the SQLiteArtifactRepository stores metadata (digest, name, type) but not
|
|
|
|
|
the content itself.
|
|
|
|
|
**Impact:** Consumers must maintain their own content cache alongside the
|
|
|
|
|
repository, defeating the purpose of centralised artifact storage.
|
2026-02-11 22:54:37 +01:00
|
|
|
**Fix applied:** Added `content` field to `Artifact` model, `content TEXT`
|
|
|
|
|
column to SQLite schema (with migration for existing DBs), and replaced
|
|
|
|
|
the resolver placeholder with `artifact.content`.
|
2026-02-11 01:17:58 +01:00
|
|
|
|
2026-02-11 22:54:37 +01:00
|
|
|
## 2. ContentMacro raw_text defaults to empty string — RESOLVED
|
2026-02-11 01:17:58 +01:00
|
|
|
|
|
|
|
|
**File:** `markitect/prompts/templates/models.py`, line 46
|
|
|
|
|
**Issue:** `raw_text: str = ""` — when macros are constructed programmatically
|
|
|
|
|
(not parsed from template text), `raw_text` defaults to `""`. The
|
|
|
|
|
ContextCompiler then calls `str.replace("", resolved.content)` which inserts
|
|
|
|
|
content between every character, producing multi-gigabyte output.
|
|
|
|
|
**Impact:** Silent data corruption; compiled prompts become unusable.
|
2026-02-11 22:54:37 +01:00
|
|
|
**Fix applied:** Added `__post_init__` to `ContentMacro` that auto-derives
|
|
|
|
|
`raw_text = f"@{{{self.target}}}"` when not provided.
|
2026-02-11 01:17:58 +01:00
|
|
|
|
2026-02-11 22:54:37 +01:00
|
|
|
## 3. No TemplateAnalyzer support for @{target} syntax — RESOLVED
|
2026-02-11 01:17:58 +01:00
|
|
|
|
2026-02-11 22:54:37 +01:00
|
|
|
**File:** `markitect/prompts/templates/parser.py`
|
|
|
|
|
**Issue:** The MacroParser parses `{{kind:target}}` syntax but the
|
2026-02-11 01:17:58 +01:00
|
|
|
templates in this example use the simplified `@{target}` syntax. There's
|
|
|
|
|
no automatic parsing for this format, requiring manual macro construction.
|
2026-02-11 22:54:37 +01:00
|
|
|
**Fix applied:** Added `SHORTHAND_PATTERN` to `MacroParser` that recognises
|
|
|
|
|
`@{target}` and maps it to `MacroKind.REQUIRED`. Updated `has_macros()`,
|
|
|
|
|
`count_macros()`, and `find_macro_positions()` accordingly.
|