Skip to content

Refuse correspondence entities in the group kernels, and pin #1480's review follow-ups - #1518

Draft
MaxGhenis wants to merge 4 commits into
mainfrom
be/s2b-p3-followup
Draft

MaxGhenis wants to merge 4 commits into
mainfrom
be/s2b-p3-followup

Conversation

@MaxGhenis

Copy link
Copy Markdown
Contributor

WIP. Three follow-ups to #1480 (S2b PR 2), from the three optional findings (P3s) in its approving review (#1480 (comment)). The Belgium session lands it after local runs, reach, an independent review and the NZ hub's clearance.

What it changes

  1. e1e90dcc pins the type-only default clashes. test_person_and_child_type_only_defaults_conflict runs each type-only pair (0/False, 0/0.0, False/0.0, 1/True) in both gather orders and expects the "conflicting defaults" refusal. Before, only the merge property caught a weakened type check, and only on runs that drew a clash on type alone: the review's isinstance_types mutant survived 72 of its 100 seeded runs.
  2. eafaad73 tests the group kernels' person_role refusal against every role in the mapping. test_group_kernels_refuse_a_person_role_entity now adds a closure-only Child module (xx/child_defaults.yaml) and a second person_role entity, Dependant, so a guard that reads only the selected modules, or names Child alone, fails it. test_without_person_role_defaults_encoding_matches_the_old_gather takes the second entity too and still checks what its name says: with no person_role default in the closure, the kernel writes exactly the columns and values of the old gather, which ignored person_role entities.
  3. 2ec2c55f makes both group kernels (concepts.encode_groups@1 and transport.scenario_override@1, through _group_inputs in transport/column_kernels.py) refuse an engine_entity that the mapping's entity correspondence names (Person and Household). concepts.encode@1 writes those entities' inputs on their own tables, so a group kernel would write them again on built units. test_group_kernels_refuse_a_correspondence_entity covers both kernels and both entities.

Mutants [the build lane's runs; the independent review re-runs them]: the review's values_only and isinstance_types fail the column file under each of 10 Hypothesis seeds; guard_selected_paths and guard_hardcoded_child fail test_group_kernels_refuse_a_person_role_entity; and removing the new guard fails all four cases of test_group_kernels_refuse_a_correspondence_entity.

What it refuses on main

On main fc5bb901, 12 group-kernel nodes appear in the 664 tracked JSON files, all with engine_entity Family: 8 concepts.encode_groups@1 and 3 transport.scenario_override@1 in NZ's scenarios.json, and 1 concepts.encode_groups@1 in NZ's transport_graph.json [executed]. NZ's correspondence maps {household: Household, person: Person}. The Python graph builders (tools/build_nz_transport_graph.py and the composed-graph test support) also pass Family. So the new guard refuses no node that NZ or the toy graphs build.

Plan

  • Local runs at the head, one file per process.
  • Reach: the kernel hashes this moves, and the US primary-QRF worker identity.
  • An independent review (GPT-6.1 Sol through Subfleet).
  • The NZ hub's clearance.
  • CI.

🤖 Generated with Claude Code

MaxGhenis and others added 4 commits November 4, 2026 15:31
Cover a closure-only Child module and a second role entity so selected-path and hardcoded guards cannot allow duplicate unit inputs. Extend the old-gather comparison to retain its coverage without role defaults.
Keep Person and Household inputs on their correspondence tables instead of writing them again on built units. Cover both entities through encode_groups and scenario_override.
Brings in #1482 and the rest of main since 6448792, so CI tests these
commits on top of #1482. Main has changed neither of this branch's files
since 6448792, and git merges without conflicts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant