# Evidence: Block 3 · Service (block-3)

- block type: block
- date: 2026-10-28
- resulting state: closed/verified
- story points (combined assembled cost): 4877
- execution id: 20261028.160957.852Z-70377705

## Stories built
- Tokenize jq programs including strings and interpolation. (lexer) [story]

## Stacked context
- stack: python_compact.md (SP 654)
- compass: COMPASS.md (SP 3420)
- implements: FEATURE-Lexer.md (SP 582)
- context: ARCHITECTURE_compact.md (SP 129)

## Build directory changes
- jq_interpreter/lexer.py
- tests/test_foundation.py
- tests/test_lexer.py

## Pre-build acceptance observation
- RED: lexer-locations (FEATURE-Lexer.md)
  intent: The lexer ignores comments and retains the source locations of successive literal tokens.
  return code: 1
  stderr:
    --- drydock: values at failure ---
      numbers = []
    --- drydock: end values ---
    Traceback (most recent call last):
      File "lexer-locations.py", line 5, in <module>
        assert [token.value for token in numbers] == [1, 2]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    AssertionError
- RED: lexer-invalid (FEATURE-Lexer.md)
  intent: Invalid string escapes and unmatched delimiters are compile failures.
  return code: 1
  stderr:
    --- drydock: values at failure ---
      source = '"\\v"'
    --- drydock: end values ---
    Traceback (most recent call last):
      File "lexer-invalid.py", line 10, in <module>
        raise AssertionError(f"accepted invalid source: {source!r}")
    AssertionError: accepted invalid source: '"\\v"'

## Post-build programmatic acceptance
- PASS: lexer-locations (FEATURE-Lexer.md)
  intent: The lexer ignores comments and retains the source locations of successive literal tokens.
  target interpreter: /mnt/c/Users/barlo/projects/drydock/.venv/bin/python
  provisioning: not required
  return code: 0
- PASS: lexer-invalid (FEATURE-Lexer.md)
  intent: Invalid string escapes and unmatched delimiters are compile failures.
  target interpreter: /mnt/c/Users/barlo/projects/drydock/.venv/bin/python
  provisioning: not required
  return code: 0

## Build summary
RESULT: SUCCESS

FILES CHANGED:
- jq_interpreter/lexer.py
- tests/test_foundation.py
- tests/test_lexer.py

SUMMARY:
Implemented jq lexer tokenization, strings/interpolation, comments, literals, delimiters, locations, and compile errors. Added regression coverage.

Checks: `pytest -q` — 17 passed; acceptance assertions passed.

BLOCKERS:
- None
