--- status: historical created: 2026-08-11 archived: 2026-08-11 reason: "Methodology retained after removing the executable cf view parser-adapter spike." --- # `cf view` parser-adapter spike methodology This artifact records the exact source shapes, adapter rules, correctness checks, and sampling procedure behind the [`cf view` parser-adapter spike](cf-view-parser-adapter-spike-2026-08.md). The executable harness and its parser dependencies are not retained. ## Source construction Every source placed `café` before the repeated measured forms so later parser ranges exercised non-ASCII offset handling. A representative unit was repeated until another copy would exceed the language's target byte count. A language comment filled the remaining bytes exactly. The result had no final newline. | Language | Target bytes | Prefix before repeated units | Padding | | --- | ---: | --- | --- | | Python | 100,009 | `# café appears before measured tokens` | `#` followed by `x` | | Go | 100,206 | the same comment followed by `package spike` | `//` followed by `x` | | shell | 100,127 | the same comment after the Bash shebang and `set -euo pipefail` | `#` followed by `x` | | HTML | 100,178 | `` | an HTML comment filled with `x` | The repeated Python unit was: ```python @decorator class RenderedItem[T]: async def render_item(self, value: T | None = None) -> str: label = f"value={value!r:>8}" return label ``` The repeated Go unit was: ```go type RenderedItem[T any] struct { Value T } func (item RenderedItem[T]) renderItem(out chan<- T) { go func() { out <- item.Value }() values := []T{item.Value} _ = values } ``` The repeated shell unit was: ```bash render_item() { local name="$1" printf '%s\n' "${name:-item}" for ((i = 0; i < 8; i++)); do value="$(printf '%02d' "$i")" printf '%s:%s\n' "$name" "$value" done cat <<'PAYLOAD' literal $text remains literal PAYLOAD } render_item "entry" ``` The repeated HTML unit was: ```html

content

``` ## Edits and unfinished inputs The same-length middle edits allowed incremental parsers to reuse the original tree without changing later offsets: | Language | Original | Replacement | | --- | --- | --- | | Python | `render_item` | `render_unit` | | Go | `renderItem` | `renderUnit` | | shell | `render_item` | `render_unit` | | HTML | `class="item"` | `class="unit"` | The benchmark appended these exact unfinished suffixes: ```text Python: \nasync def unfinished(value: str):\n text = f"""open Go: \nfunc unfinished(value chan string) {\n go func() { shell: \nunfinished() {\n value=$(printf '%s' "open HTML: \n