Skip to main content

CAD Develop Study Case

TUT04 · Terminux · English video

Video​

Open video on YouTube

Guide​

TUT04 Developer Guide (S00–S07, CAD Engineer edition, v0.2.1)

You are a CAD engineer. WNS tells you a setup path failed, but not which cells and nets are behind it. In this Guide you extend Terminux so it can pull one reported timing path out of the STA report as structured evidence. You use a coding assistant to help find the source, decide the change yourself, and confirm the result with real output and focused tests.

This is a platform development lesson. It is not a guide to asking Terminux AI about timing, and it is not an ECO flow or a global-worst-path analysis.

Two words that look alike

  • Flow Stage is a step of the Terminux or design flow, such as placement. That meaning does not change.
  • Path Element is one item, in order, along a timing path in the STA report. What it carries depends on the report row. For example, DFF_X1 at index 1 is a path element; placement is a Flow Stage.
  • The source calls path elements PathStage and parsed.stages, and the program prints 32 ordered stages. Those are real names and real output, so they stay exactly as written. They do not mean Flow Stages.

Replay requires the specified branch, revisions a0ac96ee and b4aa3601, and D1–D7 patches. Do not replay patches if any of these inputs is missing.

Before you start: what this replay is

  • D1–D7 are replayed in a disposable teaching tree. It is not your product tree, and nothing is committed.
  • Three out-of-scope files still differ from a0ac96ee: DESIGN.md, release/classification.txt, and tests/packages/test_orfs_dqe_after.py. This is not a byte-identical reproduction of that commit.
  • tests/packages/test_orfs_dqe_after.py was not run.
  • The focused tests do not establish real CLI persistence. a0ac96ee emits a RecordRequest; b4aa3601 later connected real-run persistence.
  • No EDA run and no Terminux Provider call happen in this Guide.

Screenshots are frames from the filmed run. Some filmed commands use short helpers or print more lines than the commands here, so compare the values rather than the layout.

T04D-G01: Create the isolated teaching tree

Scene S00–S01

Why you need this: Before changing a tool your team depends on, you need a place to work that cannot touch production.

Purpose: Work in a disposable clone, pinned to the baseline, so nothing touches your product tree.

Preconditions: Your Terminux repository with the feature/tut04-critical-path-evidence branch; Git. Open one shell and keep it for the whole Guide.

Pinned source: Baseline 338bff770f2ab9a4906583407bec65f81a44a327

Working directory: Your Terminux repository root, then $TUT04_WORK/teach

Action:

export TERMINUX_REPO="$(git rev-parse --show-toplevel)"
export TUT04_WORK="${TUT04_WORK:-$HOME/tut04-workshop}"
export TUT04_PATCHES="${TUT04_PATCHES:-$HOME/tut04_production_private/platform_dev_phase_a_20261109/diffs}"
mkdir -p "$TUT04_WORK"
git clone -q --no-hardlinks --no-checkout --no-tags --single-branch --branch feature/tut04-critical-path-evidence "$TERMINUX_REPO" "$TUT04_WORK/teach"
git -C "$TUT04_WORK/teach" remote remove origin
git -C "$TUT04_WORK/teach" switch -q --detach 338bff770f2ab9a4906583407bec65f81a44a327
cd "$TUT04_WORK/teach"
P=engine/src/terminux_engine
git rev-parse --short=8 HEAD; git status --short | wc -l; git remote | wc -l

Expected result: 338bff77, then 0 modified files.

G01 baseline

Filmed baseline check: the pinned commit, with nothing modified.

Verify: git remote prints nothing, so this tree cannot push.

Failure branch: If the clone or switch fails, your repository lacks these commits. STOP; do not substitute another branch.

AI prompt: None in this step.

Limits: ENV_SPECIFIC: the repository and work paths.

Next: Read what Terminux does with timing today.

T04D-G02: Read the Before state

Scene S01

Why you need this: WNS tells you a problem exists, but to chase it you need the path. Find out what the tool already gives you, so you do not rebuild it.

Purpose: Confirm what exists today (scalar DQE), and what does not: the ordered path elements of a timing path.

Preconditions: G01 done. A Python environment with the project's dependencies.

Pinned source: 338bff77

Working directory: $TUT04_WORK/teach

Action:

export TUT04_PY="${TUT04_PY:-$TERMINUX_REPO/.venv/bin/python}"
tut04_py() { env -i HOME="$TUT04_WORK" PATH=/usr/bin:/bin LANG=C.UTF-8 PYTHONDONTWRITEBYTECODE=1 PYTHONPATH="$TUT04_WORK/teach/engine/src:$TUT04_WORK/teach" "$TUT04_PY" "$@"; }
sed -n '53,62p' $P/packages/orfs_dqe/parsers.py
sed -n '134,137p' $P/packages/orfs_dqe/parsers.py
sed -n '320,324p' $P/packages/orfs_dqe/evaluator.py
git grep -n -E 'Startpoint|Path Type' -- $P/packages/orfs_dqe/parsers.py $P/packages/orfs_dqe/after.py; echo "exit=$?"
ls $P/timing_evidence 2>&1 | cut -c1-90
tut04_py -c 'from terminux_engine.packages.orfs_dqe import timing_path' 2>&1 | tail -1 | cut -c1-70

Expected result: The extract_finish_scalar signature; the evaluator calling it per check spec; exit=1 from git grep; No such file for timing_evidence; an ImportError for timing_path.

G02 before

Filmed Before state: the scalar parser, the evaluator call, exit=1 from the search in these two files, and no timing_evidence package yet.

Verify: exit=1 means no match in these two files. Do not read it as "Terminux has no timing analysis": DQE already evaluates summary metrics such as WNS.

Failure branch: If timing_path imports successfully, your PYTHONPATH is pointing at another tree. Fix that before continuing.

AI prompt: None in this step.

Source evidence: parsers.py L53–62, L134–137; evaluator.py L320–324 at 338bff77.

Limits: NEEDS_LOCAL_VERIFICATION: TUT04_PY, this was verified with the repository's own .venv (Python 3.12).

Next: Find where new data would have to travel.

T04D-G03: Ask Coding AI with reviewed excerpts, then verify the source yourself

Scene S02

Why you need this: Terminux's data flow spans several files. Guessing where to change it risks connecting it wrong. The assistant gives leads; you decide what is true.

Purpose: Let a coding assistant help trace the data path, but only from excerpts you reviewed, and check its claims against the source yourself.

Preconditions: G02 done. A coding assistant whose file access you can actually restrict. A prompt alone is not a filesystem control.

Pinned source: 338bff77

Working directory: $TUT04_WORK/teach

Action:

X="$TUT04_WORK/excerpt-only/excerpts"; mkdir -p "$X"
sed -n '53,63p' $P/packages/orfs_dqe/parsers.py > "$X/01_parsers_scalar_dataclass.txt"
sed -n '134,174p' $P/packages/orfs_dqe/parsers.py > "$X/02_parsers_extract_finish_scalar.txt"
sed -n '320,324p' $P/packages/orfs_dqe/evaluator.py > "$X/03_evaluator_scalar_dispatch.txt"
sed -n '88,160p' $P/packages/orfs_dqe/after.py > "$X/04_after_emit.txt"
sed -n '36,50p' $P/orchestration/evidence_bundle.py > "$X/05_evidence_bundle_class.txt"
sed -n '441,453p' $P/orchestration/daemon_service.py > "$X/06_daemon_receipt_bundle_branch.txt"
sed -n '28,40p' $P/llm/egress_policy.py > "$X/07_egress_data_classes.txt"
wc -l "$X"/*.txt | tail -1
grep -n -E 'record = RecordRequest|records=\[record\]' $P/packages/orfs_dqe/after.py
grep -n 'class EvidenceBundle' $P/orchestration/evidence_bundle.py
grep -n 'V2_DATA_CLASSES = ' $P/llm/egress_policy.py

Expected result: Seven excerpt files. After you ask the assistant, a reply that names real symbols and states what it cannot inspect. Then record = RecordRequest( at L109, records=[record] at L154, EvidenceBundle at L36, V2_DATA_CLASSES at L34.

G03 reply

The filmed reply on screen. Appendix B has the full, unedited text.

G03 verify after

The check in the source: after.py returns records=[record].

Verify: Each symbol the assistant cites must exist at or near the cited lines. Treat anything else as unverified.

Failure branch: If you cannot restrict the assistant to this directory, skip the AI call and read the excerpts yourself. Never hand it the repository, reports, or credentials. If its answer is weak, keep it and verify; do not re-ask until it sounds right.

AI prompt: excerpt-only/question.txt, shown in Appendix A. The filmed reply is in Appendix B. Both are literal: they use the word "stage", which we keep as written.

Limits: The assistant call itself is not part of the automated Guide check.

Next: Decide which part only reads the report, and which part should carry over to another STA tool.

T04D-G04: Decide the layers

Scene S03

Why you need this: CAD environments change tools and report formats. If the new data is tied to one report's text, every format change reaches into the analysis behind it.

Purpose: Decide the layers before writing code, based on what it costs to maintain when the STA tool or report format changes.

Preconditions: G03 done.

Pinned source: a0ac96ee (read-only)

Working directory: $TUT04_WORK/teach

Action:

git show a0ac96ee:$P/packages/orfs_dqe/timing_path.py | sed -n '18,20p'

Expected result: The adapter's docstring states that it owns the OpenSTA format and that the tool-neutral model lives in timing_evidence.

G04 ai proposal

Section 4 of the filmed reply proposes a sibling dataclass in parsers.py.

G04 adapter doc

The verified design: the adapter's docstring says it owns the OpenSTA format.

Verify: Say the three reasons in your own words: the adapter understands OpenSTA text, so a format change stays there; the model holds the path and its ordered path elements, which can carry over to another tool; a distinct evidence class controls what the AI may receive.

Failure branch: If you would rather extend parsers.py, write down what must change when the report format or the STA tool changes. Then compare.

AI prompt: The reply proposed a sibling dataclass in parsers.py and keeping V2_DATA_CLASSES unchanged (Appendix B, section 4). a0ac96ee predates this exchange: the reply did not cause that commit.

Source evidence: timing_path.py L18–20 at a0ac96ee;

Limits: Teaching rationale for a design choice, not a claim about the original session.

Next: Build the first layer: turn report text into ordered path elements.

T04D-G05: Apply the parser and model, and see the ordered path elements

Scene S04

Why you need this: Later analysis needs a path with order and source, not another scalar.

Purpose: Replay the verified parser and model patches, then turn report text into typed, ordered path elements you can trace back to the report.

Preconditions: G04 done. The D1–D7 patches.

Pinned source: Patches derived from 338bff77 → a0ac96ee

Working directory: $TUT04_WORK/teach

Action:

git apply --check "$TUT04_PATCHES"/D1*.patch "$TUT04_PATCHES"/D2*.patch "$TUT04_PATCHES"/D6*.patch "$TUT04_PATCHES"/D7*.patch && git apply "$TUT04_PATCHES"/D1*.patch "$TUT04_PATCHES"/D2*.patch "$TUT04_PATCHES"/D6*.patch "$TUT04_PATCHES"/D7*.patch; echo "apply=$?"
git show a0ac96ee:$P/timing_evidence/__init__.py > $P/timing_evidence/__init__.py
: > tests/timing_evidence/__init__.py
git status --short | grep -E 'timing_path.py|timing_evidence/$' | cut -c1-70
sed -n '184,190p' $P/packages/orfs_dqe/timing_path.py
sed -n '321,337p' $P/timing_evidence/model.py | head -3
grep -rnE -i 'orfs|opensta|nangate' $P/timing_evidence; echo "exit=$?"
mkdir -p "$TUT04_WORK/demo"
cat > "$TUT04_WORK/demo/show_stages.py" <<'PY'
from terminux_engine.packages.orfs_dqe import timing_path as T
from tests.packages import orfs_dqe_timing_path_fixture as X

parsed = T.parse_worst_setup_path(X.FINISH_REPORT_PATH_SECTION.split("\n"))
print(f"{len(parsed.stages)} ordered stages")
for s in parsed.stages[:5] + parsed.stages[18:23]:
    print(s.index, s.kind, s.role or "-", s.cell_type or "-", f"{s.incr:.2f}", f"{s.arrival:.2f}", s.fanout, s.cap)
PY
tut04_py "$TUT04_WORK/demo/show_stages.py"

Expected result: apply=0; new timing_path.py and timing_evidence/; the neutrality grep prints exit=1 (no matches); 32 ordered stages. 32 ordered stages is the program's current output text. This tutorial calls them 32 ordered Path Elements, to avoid confusion with a Flow Stage.

G05 after patch

Filmed after the patch: apply=0, and the new parser file and timing_evidence/ directory appear. The filmed step applied D1, D2, and D6; the commands above also apply D7.

G05 ordered elements

Filmed output. 32 ordered stages is the program's current text; this tutorial calls them 32 ordered path elements. The filmed helper prints extra headers, so compare the count and the rows.

Verify: Path element 1 is DFF_X1 at 0.12 ns. In this fixture, cell and net rows alternate. Selection is the worst reported path in this section, not a global worst.

Failure branch: If git apply --check fails, STOP; do not edit the patch or hand-write the code. Use git show a0ac96ee:<path> and review it read-only instead.

AI prompt: Optional: ask an assistant to explain parse_worst_setup_path() from the excerpt you give it.

Source evidence: D1, D2, D6, D7; timing_path.py L184–209, L512–518; model.py L321–337, L405–417.

Limits: GUIDED_RECONSTRUCTION in a disposable tree. Fixture values are public GCD; the run identity is synthetic. PathStage and parsed.stages are the real names in the source. They mean path elements, not Flow Stages; do not rename them.

Next: Work out how delay is distributed along this path.

T04D-G06: Compute features and keep the uncertainty

Scene S05

Why you need this: Delay distribution, fanout, load, and the limits of report precision decide where you look first.

Purpose: Turn path elements into delay features, and hand-check them against the public fixture.

Preconditions: G05 done.

Pinned source: a0ac96ee content, in the teaching tree

Working directory: $TUT04_WORK/teach

Action:

sed -n '401,409p' $P/timing_evidence/features.py | head -3
sed -n '78p;127p' tests/packages/orfs_dqe_timing_path_fixture.py
cat > "$TUT04_WORK/demo/show_features.py" <<'PY'
from terminux_engine.packages.orfs_dqe import timing_path as T
from terminux_engine.timing_evidence import features as F
from tests.packages import orfs_dqe_timing_path_fixture as X

parsed = T.parse_worst_setup_path(X.FINISH_REPORT_PATH_SECTION.split("\n"))
ev = T.build_evidence(parsed, run_id="run_" + "1" * 32, attempt=1, step_id="demo", artifact_manifest_id="am_demo",
                      artifact_manifest_sha256="0" * 64, artifact_instance_id=None, report_content_sha256=X.SOURCE_REPORT_SHA256)
fs = F.compute_features(ev)
top, cn = fs.max_stage_contribution.value, fs.cell_vs_net_delay.value
comb = top["max_combinational_stage"]
print("data_path", f"{fs.data_path_delay.value['value']:.2f}")
print("ck_to_q", f"{top['max_stage']['value']:.2f}")
print("combinational", f"{comb['value']:.2f}", fs.max_stage_contribution.status, comb["delta_t_candidates"])
print("cell", f"{cn['cell_sum']:.2f}", "net_shown", f"{cn['net_sum_shown']:.2f}", "net_upper_bound", f"{cn['net_sum_upper_bound']:.2f}")
PY
tut04_py "$TUT04_WORK/demo/show_features.py"

Expected result: 0.40 data path, 0.12 CK→Q, ambiguous with candidates [21, 23] (the candidate path elements at index 21 and 23), cell 0.39, net shown 0.00, net upper bound 0.08.

G06 features

Filmed values. The filmed helper formats them differently from show_features.py, so compare the numbers.

G06 data path

The calculation in the source: data arrival minus launch clock arrival.

Verify: By hand: data arrival 0.47 − launch clock arrival 0.07 = 0.40. The arrival of 0.41 at path element 23 is cumulative, not the data-path delay. A shown net 0.00 is not physical zero; 0.08 is a bound. Neither candidate is proven to be the slowest, and neither is a root cause.

Failure branch: If your values differ, check that the fixture and the patches are unmodified.

AI prompt: Optional: ask an assistant to look for unit or rounding mistakes, and verify whatever it says against the fixture.

Source evidence: features.py L138–153, L326–329, L401–409; test_features.py L146–150; fixture lines 78 and 127.

Limits: Public fixture; not a real-run measurement.

Next: Make the results available to the rest of Terminux.

T04D-G07: Connect the record, bundle, and policy

Scene S06

Why you need this: After a flow runs, can you find this data? And can AI get only what it is allowed to?

Purpose: Get the evidence to where Terminux can find it after a flow, control what AI may receive, and see which version does what.

Preconditions: G06 done.

Pinned source: a0ac96ee content; b4aa3601 read-only

Working directory: $TUT04_WORK/teach

Action:

git apply --check "$TUT04_PATCHES"/D3*.patch "$TUT04_PATCHES"/D4*.patch "$TUT04_PATCHES"/D5*.patch && git apply "$TUT04_PATCHES"/D3*.patch "$TUT04_PATCHES"/D4*.patch "$TUT04_PATCHES"/D5*.patch; echo "apply=$?"
git --no-pager diff -U0 -- $P/packages/orfs_dqe/after.py | grep -E '^[+-] +records' | cut -c1-80
sed -n '376,382p' $P/orchestration/evidence_bundle.py
grep -n 'TIMING_PATH_EVIDENCE_CLASS =' $P/llm/egress_policy.py
git grep -n -A1 'services = RuntimeServices(' a0ac96ee -- $P/orchestration/orfs_cli.py | cut -c40-140
git grep -n -A3 'services = RuntimeServices(' b4aa3601 -- $P/orchestration/orfs_cli.py | cut -c40-140
grep -c 'store=record_store' $P/orchestration/orfs_cli.py; echo "exit=$?"

Expected result: apply=0; the after-hook diff shows records = [record, timing_path.collect_record(...)]; the bundle compares run, attempt, step, and manifest; the new TIMING_PATH_EVIDENCE_CLASS. a0ac96ee shows RuntimeServices(notify=...) with no store; b4aa3601 shows store=record_store ....

G07 after diff

The filmed diff: records now holds a second record from collect_record.

G07 versions

Read-only history: a0ac96ee has no store; b4aa3601 adds store=record_store.

Verify: Three layers, not to be merged: a0ac96ee emits a second RecordRequest, which does not persist it on the real CLI path; a test EventStore lets the bundle read it (G08); real CLI persistence came later, in b4aa3601. Do not apply b4aa3601 here; it is a separate change.

Failure branch: If you see store=record_store in your working tree, you applied something else. Rebuild the tree from G01.

AI prompt: Master prompt (S06), SUGGESTED_CODING_PROMPT, only with excerpts you reviewed: "Show me the minimal integration points for the new timing record. Where does the after-hook emit it, how does the bundle select the same run, and how do we reject timing_path_evidence if the data policy doesn't approve it? Point to the real negative tests."

Source evidence: D3, D4, D5; evidence_bundle.py L376–396; task_scope.py L833–847, L1023–1034; orfs_cli.py L303 (a0ac96ee), L311–314 (b4aa3601).

Limits: GUIDED_RECONSTRUCTION plus a read-only history check.

Next: Test that the data appears when expected, and stays back when it should.

T04D-G08: Run focused tests: positive, tool redaction, gate rejection

Scene S07

Why you need this: One PASS is not enough. You need proof of both behaviors, and you need to know what each test does not prove.

Purpose: Show that the evidence appears when expected, and is withheld without permission.

Preconditions: G07 done. A QA directory outside your home directory, mode 0700, as tests/conftest.py requires.

Pinned source: a0ac96ee content, in the teaching tree

Working directory: $TUT04_WORK/teach

Action:

export TUT04_QA="${TUT04_QA:-/var/tmp/tut04-qa-$(id -un)}"
install -d -m 700 "$TUT04_QA" "$TUT04_QA/root"; printf '%s\n' "$TUT04_QA" > "$TUT04_QA/.terminux-test-qa-parent"; chmod 600 "$TUT04_QA/.terminux-test-qa-parent"
mkdir -p "$TUT04_WORK/guard"
cat > "$TUT04_WORK/guard/egress_guard_plugin.py" <<'PY'
import ipaddress, socket, sys

def _audit(event, args):
    if event == "socket.connect":
        sock, addr = args
        if sock.family in (socket.AF_INET, socket.AF_INET6) and not ipaddress.ip_address(addr[0]).is_loopback:
            raise RuntimeError("egress guard: non-loopback connect")
    elif event == "socket.getaddrinfo" and args[0] not in (None, "localhost", "127.0.0.1", "::1"):
        raise RuntimeError("egress guard: dns")

sys.addaudithook(_audit)
PY
tut04_pytest() { env -i HOME="$TUT04_QA" PATH=/usr/bin:/bin LANG=C.UTF-8 PYTHONDONTWRITEBYTECODE=1 PYTHONPATH="$TUT04_WORK/teach/engine/src:$TUT04_WORK/teach:$TUT04_WORK/guard" TERMINUX_TEST_QA_PARENT="$TUT04_QA" TERMINUX_TEST_QA_ROOT="$TUT04_QA/root" "$TUT04_PY" -m pytest -p egress_guard_plugin -p no:cacheprovider --no-header -q "$@"; }
B=tests/orchestration/test_evidence_bundle_timing_path.py; E=tests/llm/test_timing_path_egress.py
tut04_pytest "$B::test_matching_own_record_becomes_an_available_section" "$B::test_without_reader_the_bundle_has_no_timing_path_key" 2>&1 | tail -1; echo "exit=${PIPESTATUS[0]}"
tut04_pytest "$E::test_only_evidence_bundle_class_strips_timing_path" 2>&1 | tail -1; echo "exit=${PIPESTATUS[0]}"
tut04_pytest "$E::test_gate_denies_unapproved_timing_path_even_if_tool_layer_is_bypassed" 2>&1 | tail -1; echo "exit=${PIPESTATUS[0]}"
tut04_pytest tests/packages/test_orfs_dqe_timing_path.py::test_stage_table_matches_the_hand_derived_reference tests/timing_evidence/test_features.py::test_max_stage_is_launch_clock_to_q_and_combinational_max_is_ambiguous tests/packages/test_orfs_dqe_after_timing_path.py::test_after_emits_dqe_record_first_and_timing_record_second "$B::test_matching_own_record_becomes_an_available_section" "$E::test_only_evidence_bundle_class_strips_timing_path" "$E::test_gate_denies_unapproved_timing_path_even_if_tool_layer_is_bypassed" 2>&1 | tail -1; echo "exit=${PIPESTATUS[0]}"

Expected result: Three separate runs: 2 passed (positive), 1 passed (tool redaction), 1 passed (gate rejection), each exit=0. Then 6 passed for the focused set.

G08 positive

Positive: 2 passed, exit=0, with a test EventStore only. The filmed command shows the full pytest output; the commands above print only the last line.

G08 tool redaction

Tool redaction: 1 passed, exit=0.

G08 gate denial

Gate rejection: 1 passed, exit=0.

G08 focused set

Focused set: 6 passed, exit=0.

Verify: The positive test uses a temporary test EventStore: bundle["timing_path"]["status"] == "available" does not show real CLI persistence. Tool redaction removes the section and the rest is still sent; gate rejection returns C2_CLASS_DENIED:timing_path_evidence. They are different results.

Failure branch: QA_PARENT_* errors mean the QA directory or marker is wrong: fix the location, do not weaken the check. If dependencies are missing, stop this step and report it; do not paste someone else's output.

AI prompt: Optional: ask an assistant to explain a test failure, then check its explanation against the test source.

Source evidence: test_evidence_bundle_timing_path.py L138–144; test_timing_path_egress.py L217–223, L243–251. Recorded runs are in SOURCE_VERSION_AND_TEST_EVIDENCE.md.

Limits: The teaching tree still differs from a0ac96ee in three out-of-scope files, and tests/packages/test_orfs_dqe_after.py was not run, so this is not a byte-identical reproduction or a full regression. These tests are not timing signoff or a full-platform end-to-end run. No EDA, no Provider. NEEDS_LOCAL_VERIFICATION: QA path and Python.

Next: A real recorded GCD run is a later lesson, outside this Guide.

Appendix A: the filmed question (literal)

Provenance: NEWLY_CAPTURED_AI_REPLY, AGY CLI 1.4.10, gemini-4-argon-medium, effort medium, one call on 2026-11-09, reply sha256 eb440359…. It is a new teaching capture, not the original 2026-11-08 development session.

I am a CAD engineer extending Terminux to extract stage-level timing evidence from the worst reported setup path in an ORFS finish report.
Only the supplied reviewed excerpts are available. Identify what they prove and what you cannot inspect. Do not infer unseen symbols or test results.
Trace how scalar DQE evidence currently leaves the ORFS after-hook and reaches the evidence bundle / AI data policy. Name the actual symbols visible here, say what is missing for stage-level evidence, and propose the smallest layer boundary.
Cite only supplied code; state explicitly anything you cannot verify. Read-only: no changes, no ECO. Keep the answer under 30 lines.

Appendix B: the filmed reply (literal, unedited)

Provenance: NEWLY_CAPTURED_AI_REPLY, AGY CLI 1.4.10, gemini-4-argon-medium, effort medium, one call on 2026-11-09, reply sha256 eb440359…. It is a new teaching capture, not the original 2026-11-08 development session.

### 1. Scalar DQE Evidence Trace (Proven by Excerpts)
1. **Extraction (`packages/orfs_dqe/parsers.py`, `evaluator.py`)**: When `spec["extractor"] == "finish_section_scalar"` (L320–321), `parsers.extract_finish_scalar(lines, section=..., pattern=...)` (L134–174) calls `split_finish_sections(lines)`, matches the first regex `group("value")`, converts via `_to_number(raw)`, hashes the single matched line via `excerpt_hash`, and returns a `ScalarExtraction(value, section, line_start, line_end, excerpt_hash, problem)` (`value: float | int | None`, L53–63).
2. **Persistence & After-Hook Emission (`packages/orfs_dqe/after.py`)**: `_emit(ctx: PackageContext, evaluation: DqeEvaluation) -> PhaseResult` (L88–156) calls `db_writer.write_dqe_batch(ctx, _db_checks(evaluation), flow=DQE_FLOW, dqe_meta=_db_meta(evaluation), ...)` (L90–102) returning `receipt`. It builds:
   - `record = RecordRequest(namespace=DQE_NAMESPACE, record_type=DQE_RECORD_TYPE, key=evaluation.evaluation_id, payload=payload, ...)` where `payload = evaluation.to_json_dict()` plus `payload["dqe_write"] = db_writer.receipt_to_evidence(receipt)` (L106–124).
   - `facts` (`overall_status`, `counts`, `evaluation_id`, `policy_version`, `manifest_id`, L131–137) and `evidence` (`dqe_write`, `evaluation_id`, `manifest_id`, `manifest_sha256`, `overall_status`, L138–147) wrapped in `PhaseResult` (L149–156).
3. **Bundle Projection (`orchestration/evidence_bundle.py`, `daemon_service.py`)**: `EvidenceBundle` defines `dqe: dict[str, Any]` and `reports: dict[str, Any]` (L36–50). In `daemon_service.py` (L441–453), after `_read_receipt_projection(run_id)` and `make_receipt_projection_evidence_bundle(run_id, receipts=receipts)`, if `_resolve_execution_evidence` returns `evidence` with `evidence.dqe == "bound"` and `evidence.dqe_db_path`, `bundle["dqe"] = read_bound_dqe_items(Path(evidence.dqe_db_path), run_id)`, returned via `self._with_execution_evidence(bundle, evidence)`.
4. **AI Egress Policy (`llm/egress_policy.py`)**: `V2_DATA_CLASSES` (L33–37) includes `"evidence_bundle"` (alongside `V2_KEYS` with `"limits"`, `"approval_mode"`, etc., L39–40); `V1_DATA_CLASSES` (L29–32) only allows fixed digests like `"public_gcd_nangate45"`, `"sanitized_n1b_evidence"`, `"bounded_ecc"`.

### 2. What Cannot Be Inspected / Verified from Excerpts
- **Unseen parser/evaluator internals**: `split_finish_sections`, `_to_number`, `excerpt_hash`, how `ScalarExtraction` becomes `DqeEvaluation`, `_db_checks`, `_db_meta`, and `evaluation.to_json_dict()`.
- **Unseen DB & projection schemas**: `db_writer.write_dqe_batch`, `receipt_to_evidence`, `read_bound_dqe_items` SQLite schema/columns, `make_receipt_projection_evidence_bundle`, and normal (non-fallback) bundle assembly before line 441.
- **Unseen egress enforcement**: How `"evidence_bundle"` payload size/redaction (`"limits"`) or pin/cell/net sanitization is enforced in `egress_policy.py`.

### 3. Missing for Stage-Level Worst Setup Path Evidence
- **Multi-line structured extraction**: `ScalarExtraction` only holds a single scalar (`float | int | None`) and single-line `line_start == line_end` match (`extract_finish_scalar` returns on first matched line). It cannot represent an ordered list of timing path stages (instance/pin, cell type, incremental delay, cumulative arrival, transition/fanout, multi-line `line_start..line_end` span).
- **Storage & projection contract**: Whether `_db_checks` / `write_dqe_batch` / `read_bound_dqe_items` only persist flat scalar check rows or support structured stage lists in `bundle["dqe"]` vs. `bundle["reports"]`.

### 4. Smallest Layer Boundary Proposal
- **Keep `PhaseResult.facts`, `PhaseResult.evidence` (barrier receipt contract), and `V2_DATA_CLASSES` (`"evidence_bundle"`) unchanged.**
- **Parser (`parsers.py`)**: Add a sibling frozen dataclass (e.g., `StagePathExtraction` with `stages: tuple[StageRow, ...]`, multi-line `line_start`/`line_end`, `excerpt_hash`, `problem`) and table parser alongside `extract_finish_scalar`.
- **Evaluator → DB/Bundle (`evaluator.py` → `after.py` / `evidence_bundle.py`)**: Dispatch a new `spec["extractor"]` value in `evaluator.py`. Keep scalar checks in `_db_checks` intact; attach bounded stage-level path records either via `dqe_meta` / `RecordRequest.payload` or a dedicated `read_bound_dqe_items` subkey under `EvidenceBundle["dqe"]` (subject to verifying unseen `write_dqe_batch` / `read_bound_dqe_items` schemas and `V2_KEYS["limits"]`).

Applicable version​