Published copy. Evidence links point at the repository on branch insights/eval-and-invariants.

Insights Goal A: split and land the evaluation system and the deterministic safety fixes

2026-09-07

Result: the landable branch insights/eval-and-invariants is pushed and its pull request is open. Nothing is merged or deployed. The regression gate did not pass its strict criteria. The control arm shows that the failed criteria are below the provider noise floor. No change was moved to the meaning layer by this gate. The meaning-layer changes are parked on insights/meaning-layer-parked.

Summary

Base branch note

Local main is 6ce7648a. origin/main is a922627d. origin/main already contains the goal-1 fix package e479e81 and one desk fix. The landable branch is built from origin/main, so the pull request shows only the post-goal-1 delta. The classification table still covers the full main..V18 range in two segments.

Step 1: classification

The full table is in classification.md. It lists every path, its group, a one-line reason, and the first commit that introduced it. Mixed files list which hunks went where.

Segmenteval-systeminvariant-fixmeaning-layer
post-goal-1 (e479e81..b1b369ed), non-evidence paths9016273
post-goal-1 evidence trees184100
goal-1 (main..e479e81, already landed)93760

Uncertain items and the rule applied to each are in the classification document. The main rule: a change that alters the SQL text that reaches the database, or the prompt that produces it, is meaning-layer even when it is deterministic.

Group-2 changes that depended on a group-3 helper

Group-2 changeDependencyDecision
N01 definition compile (DefinitionApplicationError)live discovery-backed schema context (V11)Moved to group 3. With the base schema context every definition column reads as missing, so N01 would refuse every question that matches a definition.
R08 typed calendar guardphysical column types from the same schema contextKept in group 2 in its declared legacy mode. Runtime callers pass no types. The approved-SQL calendar check runs only when types are known, which never happens on this branch.
F01 customization and cached-lookup proofs; R02 merge join-key proofsql_proves_member_key in deictic_key_carry.pyInlined. The helper is a pure SQL lineage proof. Every carry-semantics change in the same module is parked.
R04 exact merge replaygroup-3 source-binding fields on the replay requestKept the request-option plumbing (execution_request). Dropped the group-3 fields.
R07 display-label deferralnoneKept whole.
_promote_ct_result_to_answer (R01 fallback)requested result shape checkKept the R01 gold-leg discard proof. Dropped the shape check and the promotion helper.
Saved-dimension merge replaypost_aggregation metadata shared with parked scalar aggregatesKept only the dimension rollup; a replay refuses unknown reduction kinds.

Step 2: the landable branch

Built from origin/main. The V18 tree was overlaid, then every meaning-layer module, hunk and test was removed. Six mixed source files were rebuilt hunk by hunk. Sixty test files are parked whole. Twenty-one mixed test files had their group-3 tests removed, or were restored to their base version when the V18 version only added group-3 expectations.

One overlay error was found and fixed before the gate: the overlay had reverted the four files of the later desk commit a922627d. They are restored to their origin/main bytes.

Checks on the final landable tree

CheckResultNotes
Full Python suite (8 workers, loadfile)28598 passed, 21 failed, 50 skippedEvery failed node is one of the 21 pre-existing failures in the goal-3 disposition. New failures: 0. The count is lower than goal 3's 29,927 because 60 group-3 test files are parked.
Curated critical invariant checks (568 in goal 3)471 passed, 0 failed, 97 parkedThe absent nodes are group-3 tests: membership, CT measure basis, N01 definitions, secret-intent refusal, chain recovery.
Narrative replay (12)12/12 passed
Migration recovery (9)9/9 passedR09
Three- and five-turn chain controls (57)parkedN08 blocked-parent recovery is meaning-layer.
Definition obligation controls (8)parkedN01 moved with its schema-context dependency.
Ruff on src/passed
Strict mypy on src/passed
Build (npm run build:css)passed, stylesheet unchangedThe rebuilt stylesheet is byte-identical to the committed one.
Node, goal-3 set (9 files)244/244Same command as goal 3.
Node, all tests/js1903/1914 (11 failed; the same 11 fail on origin/main a922627d)The failures are identical on origin/main (reports desk, compose deck header, save report). Not introduced here.
Chromium, playwright.insights-fixes.config.js56 passed (1.9m)Mocked API, real JS.
Chromium, terminal outcomes (two specs)15 passed (13.2s)Goal 3 had 21. The six parked cases exercised the clarification-answer detector, which is meaning-layer.

Fixture control 39

Goal 3 found that pd_is_ct_employee had zero true rows, so the ratified staff-exclusion predicate removed nothing. The fix sets two synthetic Pipedrive people (ids 31013 and 31047) to true. No other value changes.

ItemValue
Fixture data diff2 changed INSERT rows (docs/evidence/insights-goal-a-2026-09-07/fixture/fixture-data.diff)
Changed cellspipedrive.persons_enriched.pd_is_ct_employee: false to true for ids 31013 and 31047
Control 39SELECT count(*) FROM pipedrive.persons_enriched WHERE pd_is_ct_employee IS NOT TRUE = 62; without the predicate = 64
Self-check on the corrected fixture (insights_goal3_fixture_c39)passed: 39 predicate controls all change an answer, 383 authorized column probes, 0 schema errors, secret read denied: True
Self-check on the frozen goal-3 fixturefailed: only pd_staff_exclusion is insensitive
Holdout expected answers that change under the corrected fixture5 of 250, all in one family (known_external_person_qualification)

The corrected fixture is installed beside the frozen one, not over it. The frozen E5 seal binds the fixture generator and check scripts by absolute path and byte hash. The gate therefore ran against the frozen fixture with the sealed method bytes. The corrected fixture needs a new seal and a new baseline before it can anchor any paired claim.

Step 3: regression gate

Method: the frozen goal-3 E5 method. Same sealed corpus (250 attempts, 100 supported first turns, 50 conversations), same scorer and statistics, same fixture database, same clock anchor (2026-09-06 12:00 UTC, Europe/London calendar), provider glm-5.2 at temperature 0, seed 42, thinking off, two workers. The application snapshot is 7ba3a106 (source manifest a85de01c40aff655). The comparison arm is the retained original E5 run of e479e81. This is a regression gate, not an improvement claim.

Three candidate runs exist. Run 1 aborted after 25 attempts on provider timeouts caused by the R07 child transport, which was then parked (see below). Run 2 is the first complete run. Run 3 is the one permitted full rerun. Runs 2 and 3 use the same application bytes; no code changed between them.

Criteria

CriterionThresholdRun 2Run 3
Retained original correct completions36 of 36, or each loss named26 of 36 (FAIL, losses named)24 of 36 (FAIL, losses named)
Precisionnot below 36/67 (53.7%)37/69 (53.6%) FAIL33/71 (46.5%) FAIL
Correct-to-wrong transitions05 FAIL4 FAIL
Correct-to-error transitions03 FAIL5 FAIL
Jobs at deadlineat most 1%0/250 pass0/250 pass

Outcomes

OutcomeOriginalRun 2Run 3
comparison_unverified181210
correct_completed363733
refusal_unverified41716
silent_wrong313238
task_error161152153

First-turn execution errors: 60/100 original, 54/100 run 2, 58/100 run 3. Correct first turns: 14/100 original, 16/100 run 2, 14/100 run 3. Generated SQL byte-identical to the original run: 153/250 in run 2, 152/250 in run 3.

Lost original completions, run 2

CaseOutcomeError classGuard
independent11:negative_realized_commission:t4silent_wrong
independent11:known_zero_booked_commission:t4silent_wrong
independent11:partner_paid_and_unpaid_statements:t2silent_wrong
independent11:partner_paid_and_unpaid_statements:t4silent_wrong
independent11:verified_private_rejected_registration:t4silent_wrong
independent11:activity_deadline_before_creation:t1task_error
independent11:activity_deadline_before_creation:t3task_error
independent11:organization_wallet_share_unknown:t1refusal_unverifiedUNKNOWN-GOLD-COLUMN
independent11:organization_wallet_share_unknown:t3refusal_unverifiedUNKNOWN-GOLD-COLUMN
independent11:deal_stage_timestamp_order:t1task_error

Lost original completions, run 3

CaseOutcomeError classGuard
independent11:negative_realized_commission:first-countcomparison_unverified
independent11:negative_realized_commission:t2comparison_unverified
independent11:known_zero_booked_commission:t2task_error
independent11:known_zero_booked_commission:t4silent_wrong
independent11:partner_paid_and_unpaid_statements:t2silent_wrong
independent11:partner_paid_and_unpaid_statements:t4silent_wrong
independent11:verified_private_rejected_registration:t4silent_wrong
independent11:organization_wallet_share_unknown:t1refusal_unverifiedUNKNOWN-GOLD-COLUMN
independent11:activity_duration_missing_due_time:t1task_error
independent11:organization_wallet_share_unknown:t3task_error
independent11:activity_duration_missing_due_time:t3task_error
independent11:deal_stage_timestamp_order:t1task_error

Cause analysis of the run 2 losses

Each of the ten lost cases was traced through the provider trace, the stored turn rows and the application code on both snapshots.

Control arm

To measure the noise floor, the original application e479e81 was rerun with the same frozen method on the seven chains that contain the ten lost cases (28 attempts, control arm). The candidate was rerun on the same chains (28 attempts).

ArmOriginal correct in scopeRetainedCorrect-to-wrongCorrect-to-errorCorrect-to-refusalSQL identical to baseline
Original rerun (control)1363215/28
Candidate rerun (scoped)1343605/28

The original application does not reproduce its own correct completions under the frozen method. The gate criteria of zero correct-to-wrong and zero correct-to-error transitions are below the provider noise floor. Per-case outcomes for all four samples:

CaseOriginal E5Original rerunRun 2Candidate scoped rerunRun 3
independent11:activity_deadline_before_creation:t1correct_completedcorrect_completedtask_errortask_errorcorrect_completed
independent11:activity_deadline_before_creation:t2comparison_unverifiedtask_errortask_errortask_errorcomparison_unverified
independent11:activity_deadline_before_creation:t3correct_completedcorrect_completedtask_errortask_errorcorrect_completed
independent11:activity_deadline_before_creation:t4comparison_unverifiedcomparison_unverifiedtask_errortask_errorcorrect_completed
independent11:deal_stage_timestamp_order:t1correct_completedtask_errortask_errortask_errortask_error
independent11:deal_stage_timestamp_order:t2task_errortask_errortask_errortask_errortask_error
independent11:deal_stage_timestamp_order:t3task_errortask_errortask_errortask_errortask_error
independent11:deal_stage_timestamp_order:t4task_errortask_errortask_errortask_errortask_error
independent11:known_zero_booked_commission:t1comparison_unverifiedcomparison_unverifiedcomparison_unverifiedsilent_wrongsilent_wrong
independent11:known_zero_booked_commission:t2correct_completedcorrect_completedcorrect_completedsilent_wrongtask_error
independent11:known_zero_booked_commission:t3comparison_unverifiedsilent_wrongcomparison_unverifiedsilent_wrongcomparison_unverified
independent11:known_zero_booked_commission:t4correct_completedcomparison_unverifiedsilent_wrongcorrect_completedsilent_wrong
independent11:negative_realized_commission:t1comparison_unverifiedcomparison_unverifiedcomparison_unverifiedcomparison_unverifiedcomparison_unverified
independent11:negative_realized_commission:t2correct_completedcorrect_completedcorrect_completedcorrect_completedcomparison_unverified
independent11:negative_realized_commission:t3comparison_unverifiedcomparison_unverifiedcomparison_unverifiedsilent_wrongcomparison_unverified
independent11:negative_realized_commission:t4correct_completedsilent_wrongsilent_wrongcorrect_completedcorrect_completed
independent11:organization_wallet_share_unknown:t1correct_completedrefusal_unverifiedrefusal_unverifiedtask_errorrefusal_unverified
independent11:organization_wallet_share_unknown:t2task_errortask_errortask_errortask_errortask_error
independent11:organization_wallet_share_unknown:t3correct_completedtask_errorrefusal_unverifiedtask_errortask_error
independent11:organization_wallet_share_unknown:t4task_errortask_errortask_errortask_errortask_error
independent11:partner_paid_and_unpaid_statements:t1comparison_unverifiedcomparison_unverifiedsilent_wrongcomparison_unverifiedsilent_wrong
independent11:partner_paid_and_unpaid_statements:t2correct_completedcorrect_completedsilent_wrongcorrect_completedsilent_wrong
independent11:partner_paid_and_unpaid_statements:t3comparison_unverifiedcomparison_unverifiedsilent_wrongcorrect_completedsilent_wrong
independent11:partner_paid_and_unpaid_statements:t4correct_completedsilent_wrongsilent_wrongtask_errorsilent_wrong
independent11:verified_private_rejected_registration:t1comparison_unverifiedcomparison_unverifiedcomparison_unverifiedsilent_wrongcomparison_unverified
independent11:verified_private_rejected_registration:t2correct_completedcorrect_completedcorrect_completedsilent_wrongcorrect_completed
independent11:verified_private_rejected_registration:t3comparison_unverifiedcomparison_unverifiedsilent_wrongsilent_wrongsilent_wrong
independent11:verified_private_rejected_registration:t4correct_completedsilent_wrongsilent_wrongsilent_wrongsilent_wrong

Transitions, run 2

From (original)To (run 2)Count
comparison_unverifiedcomparison_unverified8
comparison_unverifiedcorrect_completed3
comparison_unverifiedsilent_wrong4
comparison_unverifiedtask_error3
correct_completedcorrect_completed26
correct_completedrefusal_unverified2
correct_completedsilent_wrong5
correct_completedtask_error3
refusal_unverifiedrefusal_unverified1
refusal_unverifiedsilent_wrong1
refusal_unverifiedtask_error2
silent_wrongcomparison_unverified3
silent_wrongcorrect_completed1
silent_wrongrefusal_unverified3
silent_wrongsilent_wrong13
silent_wrongtask_error11
task_errorcomparison_unverified1
task_errorcorrect_completed7
task_errorrefusal_unverified11
task_errorsilent_wrong9
task_errortask_error133

Transitions, run 3

From (original)To (run 3)Count
comparison_unverifiedcomparison_unverified7
comparison_unverifiedcorrect_completed2
comparison_unverifiedsilent_wrong6
comparison_unverifiedtask_error3
correct_completedcomparison_unverified2
correct_completedcorrect_completed24
correct_completedrefusal_unverified1
correct_completedsilent_wrong4
correct_completedtask_error5
refusal_unverifiedcorrect_completed2
refusal_unverifiedrefusal_unverified1
refusal_unverifiedtask_error1
silent_wrongcomparison_unverified1
silent_wrongcorrect_completed1
silent_wrongrefusal_unverified4
silent_wrongsilent_wrong16
silent_wrongtask_error9
task_errorcorrect_completed4
task_errorrefusal_unverified10
task_errorsilent_wrong12
task_errortask_error135

The full 250-row tables are docs/evidence/insights-goal-a-2026-09-07/holdout/case-transitions-run2.json and case-transitions-run3.json.

Moved from group 2 to group 3 during the gate

One change moved: the R07 child-process provider HTTP transport (_JobDeadlineTransport, _job_http_client_kwargs and the child script in services/llm_executor.py, with its call sites in services/bi_sql_llm_generator.py). The first full gate run on snapshot d963f75e was stopped after 25 attempts: 20 of 29 provider calls timed out at exactly 25 s while the 7 that completed took 4 to 9 s, and a plain SDK probe answered in 1 to 4 s. Isolated reproduction: through the job-bound transport, 20 KB and 40 KB prompts complete in 2 to 3 s; 60 KB and 90 KB prompts time out at 25 s. Cause: Popen.communicate(input, timeout=0.025) times out before the child drains stdin, and the retry with input=None never re-registers stdin, so payloads above the pipe buffer never finish and the child blocks in json.load(sys.stdin). V18 showed the same defect as 10 timeouts in 906 calls; the base prompt path on this branch produces larger prompts, so it hit most calls. The transport is not meaning-layer, but it is defective, so it is parked with a fix note. The rest of N07 stays. The aborted run is retained at /tmp/lore-goal3-eval/holdout-goal-a-run-aborted-provider-timeouts and its receipts in the evidence tree. Run 2 (the first complete run) and run 3 (the one permitted full rerun) both used snapshot 7ba3a106 with fresh pristine states. The resume session moved nothing else: see the cause analysis and the control arm.

Nothing else moved. The resume session found no responsible change for the run 2 losses. Moving a deterministic fix to the meaning layer without a reproduced cause would not change the noise.

Gate verdict

The strict criteria fail on both complete runs. The control arm shows the same criteria fail for the original application against itself. The landable branch is therefore not shown to regress the original, and it is not shown to be equal to it either. The pull request is opened for a human decision with these numbers in its body. A gate that can pass needs a deterministic generator or a paired design with repeated samples per case.

Step 4: parked

Branch insights/meaning-layer-parked is created from the landable branch and applies group 3. It is not pushed. Its README, docs/plans/2026-09-07-meaning-layer-parked-README.md, lists what is there, why it is parked, the holdout numbers that parked it, the 12 lost original completions, and the 44 recovery cases from the goal-3 report.

Step 5: delivery

Unverified

Evidence