Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .governance/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"core": {
"ownedPaths": [
"src/**",
"testql/**",
"tests/**"
]
},
Expand Down Expand Up @@ -158,4 +159,4 @@
"github-app-review",
"signed-attestation"
]
}
}
4 changes: 2 additions & 2 deletions .governance/manifest.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
".governance/intent.schema.json": "c5cee010aabcc09dce13e12583848371a7b3eacc898b253cd9bb455d4eba6801",
".governance/lock.schema.json": "fc6f1143ef713c993b61270dd2d7545a52cb0b8501aadb188e6d0152a208b207",
".governance/manifest.base.json": "dfccc0af1b6e27f6bd29f6f97c1778c5f66932dd9da7c33fa63a2c4ce071910c",
".governance/manifest.json": "ec49eeafc24f090c6d2b34ffc1dda10c34814aad0b9cf0cac34b3b1e626ce29e",
".governance/manifest.json": "446d8b56c05df0effcdb3b48da6f42e8da5efc8f511b7f0ff1d7154bef7cc4a0",
".governance/manifest.schema.json": "d48f258e3397ac2d8c5010e5ccdeef9eaf87b0b015d56798d11d5916c5f70a18",
".governance/package-manifest.json": "7d356f590f312b4983519e21de840387e8c561f11a53e2db13f012098dd27b07",
".governance/required-checks.json": "579e008e2dba9110ce45d34fdd96768fa28c003a339cf338378d28fe00fb83a2",
Expand All @@ -29,4 +29,4 @@
"project/governance-check.sh": "158ca61531b8e51ba484de8eb6f91f4e4fbba908ae3c8db678b63bf6bab49923",
"project/new-ticket.sh": "92c5cb880a3b3e83567c88fbc293e24d3d81cefa420667e38e71c9db661e3cdb"
}
}
}
2 changes: 2 additions & 0 deletions project/TICKETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ This file indexes governance tickets without taking ownership of
<!-- AUTO:TICKET_INDEX:START -->
| Ticket ID | Spec | Preprompt | Human input | Agent plans | Agent logs | Changelog |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| **ticket-001** | [`README.md`](./ticket-001/README.md) | [`preprompt.md`](./ticket-001/preprompt.md) | - | [`ai-devin.md`](./ticket-001/ai-devin.md) | [`ai-devin-logs.txt`](./ticket-001/ai-devin-logs.txt) | [`changelog.md`](./ticket-001/changelog.md) |
| **ticket-002** | [`README.md`](./ticket-002/README.md) | [`preprompt.md`](./ticket-002/preprompt.md) | - | [`ai-codex.md`](./ticket-002/ai-codex.md) | [`ai-codex-logs.txt`](./ticket-002/ai-codex-logs.txt) | [`changelog.md`](./ticket-002/changelog.md) |
<!-- AUTO:TICKET_INDEX:END -->
66 changes: 66 additions & 0 deletions project/ticket-002/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Ticket 002: Support binary HTTP response assertions

- **ID**: ticket-002
- **Owner**: unresolved:human
- **Status**: IN_PROGRESS
- **Workflow state**: PUBLICATION
- **Created**: 2026-09-01

## Goal and scope

Make the classic and Unified IR HTTP runners classify response bytes before
decoding. Preserve JSON/text compatibility and expose bounded body evidence for
binary responses: media type, byte length, SHA-256 and detected magic type.

This ticket owns only the shared response parser, both HTTP executors and their
focused regression tests. It does not add a new DSL command or implement
domain-specific PNG/PDF/KiCad validation.

## Acceptance criteria

- [x] AC-01: The user's `continue` instruction is recorded as
`SESSION_EXECUTION_AUTHORIZATION` for the stated binary-response scope.
- [x] AC-02: JSON objects/lists and bounded text retain their current public
representation.
- [x] AC-03: Binary bodies are never decoded as UTF-8 and expose deterministic
`content_type`, `byte_length`, `sha256` and `magic` evidence.
- [x] AC-04: Classic and Unified IR API execution use the same parser and cannot
diverge on PNG/PDF responses.
- [x] AC-05: Focused tests, full pytest, Docker checks and
`project/governance-check.sh` pass.

## Governance prerequisite

`.governance/manifest.json` assigns the `core` workstream only `src/**` and
`tests/**`, while this repository's production package lives under
`testql/**`. The active governance ticket `ticket-001` owns
`.governance/**`. The user explicitly authorized the minimal correction on
2026-09-01: add `testql/**` to `core.ownedPaths` without changing any other
workstream or delivery policy. The managed lock is updated to bind that local,
extendable manifest.

## Validation evidence

- Current focused HTTP/interpreter/IR suite: `69 passed`; the original wider
implementation run also passed all `82` selected tests.
- Full suite after installing the repository's four local test plugins:
`1704 passed, 9 skipped`.
- Ruff and isolated mypy check for the new dependency-free parser: passed.
- Viewer live scenarios against `127.0.0.1:8088`: `59/59 passed`, including
byte-derived MIME/magic/size assertions for two PNG files, two SVG files and
one PDF file.
- Viewer source validation: `596 passed, 10 skipped`; PCB/SCH hashes unchanged.
- Compose configuration for all three declared files: passed.
- Production image build and CLI startup: passed with TestQL `1.2.67`.
- E2E image build and execution: `1690 passed, 23 skipped`.
- Managed governance check and `git diff --check`: passed.

The repository-authored Docker packaging blocker was resolved independently by
ticket-001 and merged through PR #7. Ticket-002 was resumed and fully validated
on top of that exact `main` revision without taking ownership of Docker or
Compose paths. The ticket is ready for protected publication.

## Participants

- Human participant: unresolved; no user-* file was created by this script.
- Agent participant: [ai-codex.md](ai-codex.md)
14 changes: 14 additions & 0 deletions project/ticket-002/ai-codex-logs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
2026-09-01T06:50:26Z SESSION_EXECUTION_AUTHORIZATION user="kontynuuj"
2026-09-01T06:50:26Z BLOCKED GOV-WORKSTREAM-003 core owns src/** and tests/**; production package is testql/**
2026-09-01T07:05:00Z AUTHORIZATION user="tak" scope="add testql/** to core.ownedPaths"
2026-09-01T07:05:00Z EDIT ticket=ticket-002 blocker=resolved
2026-09-01T07:35:52Z IMPLEMENTATION commit=dbf247a parser=shared classic=enabled ir=enabled
2026-09-01T07:35:52Z VALIDATION focused="82 passed" full="1704 passed, 9 skipped" viewer="596 passed, 10 skipped" live="59/59 passed"
2026-09-01T07:35:52Z DOCKER compose=config-pass parser-python3.12=pass image=fail reason="Dockerfile.e2e COPY src/: source absent"
2026-09-01T07:35:52Z BLOCKED owner=ticket-001 path=Dockerfile.e2e publication=pending
2026-09-01T09:17:51Z RESUMED dependency="PR #7 merged as 1125743e4854eed84c3ee7c6b0a5d17c572fd16f"
2026-09-01T09:17:51Z VALIDATION combined_tree=true docker_paths_owner=ticket-001
2026-09-01T09:29:23Z VALIDATION focused="69 passed" full="1704 passed, 9 skipped" ruff=pass mypy=pass governance=pass compose=pass
2026-09-01T09:29:23Z DOCKER runtime_build=pass runtime_start="TestQL 1.2.67" e2e_build=pass e2e="1690 passed, 23 skipped"
2026-09-01T09:29:23Z INTEGRATION viewer_live="59/59 passed" endpoint="http://127.0.0.1:8088"
2026-09-01T09:29:23Z PUBLICATION ready=true pr=6
68 changes: 68 additions & 0 deletions project/ticket-002/ai-codex.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
participant-id: agent:codex
participant: codex
role: agent
ticket: ticket-002
---
# Participant: codex (AI agent)

## Understanding

TestQL 1.2.66 crashes when an API response is PNG/PDF because the classic
runner decodes every body as strict UTF-8. The editable 1.2.67 checkout avoids
the crash with replacement characters, but does not preserve binary evidence,
and the Unified IR executor still uses strict decoding. The repair should be a
single shared byte classifier used by both paths.

The user's `continue` instruction is `SESSION_EXECUTION_AUTHORIZATION` for this
implementation scope. The subsequent explicit `tak` authorizes the minimal
governance prerequisite: assign the repository's existing `testql/**` package
to the `core` workstream.

## Execution plan

1. Apply and validate the governance-owned correction assigning `testql/**`
to `core`.
2. Add a shared response-byte classifier without a runtime dependency.
3. Adopt it in the classic and Unified IR HTTP executors.
4. Add focused JSON, text, PNG and PDF regression tests.
5. Run focused/full pytest, Docker and governance checks.

## Actual changes

- Read repository governance, roadmap, active tickets and both HTTP executor
implementations.
- Reproduced the version split: project venv 1.2.66 fails on binary UTF-8,
editable 1.2.67 completes but only retains replacement text.
- Created a bounded implementation ticket without touching executable source.
- Received explicit authority for the governance prerequisite and moved the
ticket to `EDIT`.
- Added one dependency-free parser that classifies raw response bytes before
decoding and records deterministic kind, normalized content type, byte
length, SHA-256 and file magic.
- Routed both the classic interpreter and Unified IR API executor through the
same parser. Classic OQL exposes evidence as `_body`; Unified IR exposes it
as `body` and retains `_body` in execution variables.
- Preserved JSON object/list and bounded text compatibility, including legacy
three-/two-value monkeypatch return shapes used by existing tests.
- Added contract tests for JSON, text, PNG, PDF, SVG, misleading MIME headers,
classic OQL assertions and Unified IR assertions.
- Proved the contract against the live Viewer render endpoints and expanded
its smoke scenario to assert raw-byte evidence rather than status alone.
- Validation passed: current focused `69 passed` (and the original wider
selection `82 passed`), full TestQL `1704 passed, 9 skipped`, Viewer source
suite `596 passed, 10 skipped`, live smoke `59/59`, E2E container
`1690 passed, 23 skipped`, production container startup, Ruff, isolated
mypy, all Compose configurations and governance.

## Resolved blockers

- `Dockerfile.e2e` previously copied the absent `src/` directory. Ticket-001
corrected the repository packaging in PR #7, which Validator merged to
`main` as `1125743e4854eed84c3ee7c6b0a5d17c572fd16f`.
- Root `TODO.md` is also owned by ticket-001, so this ticket records its status
here instead of creating an overlapping governance diff.

Ticket-002 completed `VALIDATION` on the combined tree and moved to
`PUBLICATION`. It does not modify or claim ownership of the Docker, Compose or
root roadmap files brought in from `main`.
24 changes: 24 additions & 0 deletions project/ticket-002/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ticket Changelog (ticket-002)

## [0.1.0] - 2026-09-01

- Initial governance scaffold created.
- No human participant identity or content was generated.
- Recorded `SESSION_EXECUTION_AUTHORIZATION`, the binary-response acceptance
criteria and the unmapped `testql/**` workstream blocker.
- Recorded explicit authorization to add `testql/**` to `core.ownedPaths` and
resumed the ticket in `EDIT`.
- Added shared binary-safe HTTP response evidence for classic OQL and Unified
IR API execution, with JSON/text compatibility and PNG/PDF/SVG regression
tests.
- Validated the implementation with the full TestQL and Viewer suites plus a
live render smoke test.
- Moved the ticket to `BLOCKED` in validation because the pre-existing
`Dockerfile.e2e` copies missing `src/`; that path belongs to active
governance ticket `ticket-001`.
- Resumed validation after ticket-001 fixed Docker packaging and PR #7 was
merged to `main`; ticket-002 itself does not modify the Docker-owned paths.
- Revalidated the combined tree with the focused and full host suites, Ruff,
mypy, all Compose configurations, managed governance, both container builds,
the full E2E image suite and the live Viewer scenarios.
- Completed every acceptance criterion and moved the ticket to `PUBLICATION`.
24 changes: 24 additions & 0 deletions project/ticket-002/intent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"schema": "new-project.intent/v3",
"ticket": "ticket-002",
"summary": "Support binary HTTP response assertions",
"workstream": "core",
"classification": {
"kind": "BUG",
"priority": "P1",
"origin": "requested"
},
"allowedPaths": [
"project/ticket-002/**",
"project/TICKETS.md",
"testql/http_response.py",
"testql/interpreter/_api_runner.py",
"testql/ir_runner/executors/api.py",
"tests/test_api_binary_responses.py"
],
"forbiddenPaths": ["project/ticket-*/user-*.md"],
"stacks": ["docker"],
"dependsOn": [],
"conflictsWith": [],
"integrationTicket": null
}
8 changes: 8 additions & 0 deletions project/ticket-002/preprompt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Ticket preprompt

- **Task ID**: ticket-002
- **Task title**: Support binary HTTP response assertions
- **Created**: 2026-09-01T06:50:26Z

Keep executable implementation outside this governance/evidence directory.
Read a human-owned user-*.md file only when one exists.
Loading
Loading