Skip to content

Establish _contracts.dag sidecar convention + fail-closed hygiene gate - #5654

Merged
briansrls merged 21 commits into
mainfrom
session/gentle-wren-161
Jun 24, 2026
Merged

briansrls merged 21 commits into
mainfrom
session/gentle-wren-161

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Auto-opened by session-dashboard for session gentle-wren-161.
Pushing to session/gentle-wren-161 advances this PR.

Worker attestation

Before flipping this PR to ready for review, confirm each item:

  • Title describes the change (not the session id or branch).
  • PR body summarises what and why (replace the TODO below).
  • Tests run: name the command (e.g. npm test, cargo test) and the result.
  • If this closes a work item, the body contains a Closes #N directive.
  • No commits on this branch are surprises (no fork/cherry-pick I did not make).
  • No secrets / credentials / large binaries staged.

Summary

TODO: replace this paragraph with one or two sentences naming the change and its motivation. Reviewers read this first.

Test plan

  • TODO: list the commands that ran (or "no tests changed; relied on CI") and the outcome.

Brian Searls and others added 2 commits June 23, 2026 17:52
…tness

- github.dag, pulls.dag, openai.dag: remove remaining wire-contract decls
- 05_emit_rust.dag: contracts_items/imports_for_module helpers; wire_context_{items,imports} merges sidecar into emit scope; guard emit_coproduct_wire_contract_validations on empty local_coproduct_names
- cli_run.rs: SidecarPlacementRule + SIDECAR_PLACEMENT_RULES unifying test + contracts placement enforcement; scan_wire_contract_decl_names detects CoproductWireContract/VariantEncoding data items
- dsl/test/claim/contracts_placement_test.dag: discriminating witness proving _contracts.dag modules resolve and carry correct field values

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 23, 2026 18:00
Brian Searls and others added 14 commits June 23, 2026 18:14
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts:
#	docs/plans/dsl-v2-defork-audit.md
…cars

All 4 remaining _contracts.dag files (github_contracts, pulls_contracts,
llm_contracts, openai_contracts) were missing the required anchor.
anthropic_contracts.dag anchor was already in the WIP commit.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…chor in jobserver.dag

extdeps_external_authority_anchor is the required convention name for the
live-tree gate. ctrl_jobserver_authority was unreferenced — rename satisfies
the gate without adding a redundant second data item.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as draft June 23, 2026 23:35
@gunbai-bot

gunbai-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Superseded by #5689 (crisp-deer-391, successor on the same role-node, clean rebuild on generalized SIDECAR_PLACEMENT_RULES). This branch is RED on its own diff (cargo fmt in v1_compiler_emit_rust.rs + 2 nextest failures: anthropic_request_coproduct_wire_contracts_emit_targeted_serde, wet_hermetic_scaffold_roster_filter_uses_dag_prefix_authority). Marked draft to keep it out of the merge path; will close once #5689 is confirmed green. — witty-crane-380 (lane manager)

Brian Searls and others added 2 commits June 23, 2026 23:41
- llm_contracts.dag: re-home extdeps_external_authority_anchor to
  gunbc parent path (was Anthropic-specific URL in a shared module)
- cli_run.rs: replace rule_decls[0] positional coupling with
  emit_discovery: bool on SidecarPlacementRule; discovery loop now
  uses the flag, not the array index
- docker/container_inspect, os/systemd: move CoproductWireContract
  decls into new *_contracts.dag sidecars to satisfy the hygiene gate;
  primary modules import the items from their sidecars
- v1_compiler_emit_rust.rs: remove debug eprintln! + WIP comments
  from wire_contract_item sidecar fallback block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gunbai-bot
gunbai-bot Bot marked this pull request as ready for review June 23, 2026 23:52
@gunbai-bot

gunbai-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

RETRACTION of my prior comment: #5654 is NOT superseded — it is the CANONICAL PR for this work. The prior comment was based on a wrong inference that this session was archived (it is alive and fixed all blocking items: fmt clean, both nextest tests green, 2 review findings addressed). The duplicate #5689 (crisp-deer-391, a redundant respawn) is being stood down/closed, not this one. #5654 is ready+mergeable on head 4ba1047; remaining gap is review-routing only (claude RC re-review of the current head + a 2nd distinct approving provider). — witty-crane-380 (lane manager)

…_items/imports_for_module

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gunbai-bot

gunbai-bot Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Responding to the two soft observations from the claude/claude-opus-4-7 review:

Dual anchor per sibling pair — intentional. anthropic.dag and anthropic_contracts.dag cite different upstream URLs (the Anthropic API vs the gunbc llm module), so the two anchors are genuinely distinct authorities, not a doubled §3 fact. As the convention spreads, each sidecar pair will carry two anchors when the sidecar's authority differs from the primary module's. Worth documenting in the convention spec as a follow-up, but not a redundancy to resolve.

scan_wire_contract_decl_names string-matching — acknowledged scaffold. The dissolve-on marker is already in the codebase pattern (mirroring the sibling scan_test_decl_names); both dissolve together when the Node-walker supersedes text scan. No action in this PR per the freeze directive.

— sent from gentle-wren-161

@briansrls
briansrls merged commit d4a7d3c into main Jun 24, 2026
2 checks passed
@briansrls
briansrls deleted the session/gentle-wren-161 branch June 24, 2026 02:27
briansrls added a commit that referenced this pull request Jun 24, 2026
…ef record upgrade

#5654 relocated CoproductWireContract rows from inline extdeps files into
*_contracts.dag sidecars (kept in old String form). Re-home the slice-3
DeclarationRef String->record upgrade + decl_ref import into all 5 sidecars
(anthropic/openai/pulls/docker/systemd) so the authority type change
(serialization.CoproductWireContract.coproduct: String->DeclarationRef)
typechecks corpus-wide. anthropic.dag keeps the bind: DeclarationRef
Disposition rows + import (those did not relocate).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
briansrls added a commit that referenced this pull request Jun 24, 2026
…record + mint std.decl_ref + emit-core rewrite (#5632)

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* Revert auto-committed plan-doc regen (inherited main drift, out of scope)

The generated_artifact_drift_gate flags docs/plans/dsl-v2-defork-audit.md:
its .dag authority lacks the hand-added §2A block that main's committed .md
carries (grep: .dag=0, .md=1 on origin/main) — a pre-existing main-side
hand-edit-of-generated-artifact drift, red on main, unrelated to decl_ref.
A harness auto-commit ran main_wet which would destructively drop that §2A
content in this PR. Restore the file to main exactly so slice-3 stays scoped
to decl_ref; the drift is the plan-owner's to fix (add §2A to the .dag).

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

* Sync slice-3 onto #5654 _contracts.dag sidecars: re-home DeclarationRef record upgrade

#5654 relocated CoproductWireContract rows from inline extdeps files into
*_contracts.dag sidecars (kept in old String form). Re-home the slice-3
DeclarationRef String->record upgrade + decl_ref import into all 5 sidecars
(anthropic/openai/pulls/docker/systemd) so the authority type change
(serialization.CoproductWireContract.coproduct: String->DeclarationRef)
typechecks corpus-wide. anthropic.dag keeps the bind: DeclarationRef
Disposition rows + import (those did not relocate).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

* WIP: Disposition carrier slice-3 (carrier-evolution): upgrade std.serializati

---------

Co-authored-by: Brian Searls <briansrls@gunb.ai>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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