Skip to content

P0 §5.1 Phase-2: provenance-key the shell-literal guard emit-side (fail-open to fail-closed) - #5776

Merged
briansrls merged 7 commits into
mainfrom
session/sleek-newt-870
Jun 25, 2026
Merged

briansrls merged 7 commits into
mainfrom
session/sleek-newt-870

Conversation

@gunbai-bot

@gunbai-bot gunbai-bot Bot commented Jun 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Converts the emit-side InlineSyntaxLiteral face of medium_structure_containment from marker-sampled (fail-open) to provenance-keyed (fail-closed): a string literal authored as an arg to an emitted_medium_emit_fn is now caught regardless of whether it contains #!/ or >/dev/null. Mirrors the check-side's existing call-target provenance architecture. Also expands the emit-fn set to cover shell provisioning functions (toolchain_provision_shell_exec, autoinstall_user_data, install_server_dnsmasq_conf) and registers the two newly-caught provision test files on the exception roster.

Changes

  • medium_structure_project.rs: adds emit_side_provenance_walk + emit_side_provenance_scan_function (string-literal-arg detection over emit fn call sites, 1-hop let-bound included); hooks them into medium_structure_leak_facts alongside the existing marker scan
  • medium_structure_containment.dag: adds 3 emit fns to emitted_medium_emit_fns; adds srv3_os_install_emit_test.dag + srv3_install_server_emit_test.dag to the exception roster (newly caught by check-side after fn expansion); removes the HONESTY fail-open note from construction_justification
  • plant.dag: adds planted_provenance_leak_markerfree — calls ci_yml_drifted(committed: "git add && git commit"), caught by provenance, zero markers
  • planted_leak_test.dag: count 3→4

Test plan

  • gunbc run ... --function medium_structure_planted_leak_detected_holds --claim-run → true (count==4, including the new marker-less planted case)
  • gunbc run ... --function medium_structure_clean_tree_holds --claim-run → true (canonical corpus count==0)
  • All 5 discriminator unit tests (discriminators_test.dag) → true
  • cargo build -p v1-compiler (Rust compile) → clean

briansrls and others added 2 commits June 25, 2026 00:05
…il-closed)

Mirror the check-side's call-target provenance on the emit-side:
- Add emit_side_provenance_walk + emit_side_provenance_scan_function to
  medium_structure_project.rs — detects string literal args passed to
  emitted_medium_emit_fns (direct or 1-hop let-bound), regardless of markers
- Expand emitted_medium_emit_fns with toolchain_provision_shell_exec,
  autoinstall_user_data, install_server_dnsmasq_conf
- Roster srv3_os_install_emit_test.dag + srv3_install_server_emit_test.dag
  (newly caught on check-side by the expanded emit-fn set)
- Add planted_provenance_leak_markerfree to plant.dag: calls ci_yml_drifted
  with "git add && git commit" — no markers, caught only by provenance
- Update planted_leak_test.dag count 3→4
- Remove HONESTY fail-open note from construction_justification

Green by execution: medium_structure_planted_leak_detected_holds=true (count==4)
+ medium_structure_clean_tree_holds=true (canonical corpus clean)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 25, 2026 00:09
briansrls and others added 2 commits June 25, 2026 01:34
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…gin/main)

main_wet regressed accurate LANDED Phase A content back to stale .dag prose.
Not my lane — neat-boar owns this drift. Restore to origin/main's correct version.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
briansrls and others added 2 commits June 25, 2026 02:45
Both additive: main added serialize_html_source/serialize_fragment emit fns +
planted_html_check_side_leak (check-side); this branch adds shell provenance
emit fns + planted_provenance_leak_markerfree. Combined: 5 planted leaks.
Rationale updated to incorporate Html specifics + drop stale "arrives in a
later PR" sentence (Phase-2 now landed).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@briansrls
briansrls merged commit 81e0c5e into main Jun 25, 2026
0 of 2 checks passed
@briansrls
briansrls deleted the session/sleek-newt-870 branch June 25, 2026 04:40
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