Skip to content

H - #658

Merged
briansrls merged 2 commits into
mainfrom
session/vivid-eagle-345
Apr 22, 2026
Merged

H#658
briansrls merged 2 commits into
mainfrom
session/vivid-eagle-345

Conversation

@briansrls

Copy link
Copy Markdown
Contributor

Opened from session-dashboard for session vivid-eagle-345.

briansrls added a commit that referenced this pull request Apr 22, 2026
…scalations

Pro's APPROVE_WITH_COMMENTS on #652 sha 457da80 flagged that the
three new debt rows had end-state dissolutions but no named
triggers, failing the tracked-debt discipline bar (per INVARIANTS
P5 and modeling-discipline §95-106).

Plus: the D/F/G lane escalations (merry-owl-732 stopped pre-PR,
smart-dove-561 PR #657 findings, sunny-bee-588 PR #654 findings)
revealed that two of my three rows were framed wrong — not just
missing triggers, but naming the wrong dissolution target entirely.

Updates:

**Row: __EMIT_BUG sentinels (F rescope).**
- Was: "converge three target specs on native compile-time error forms"
- Now: all four are already fail-closed in native sense (F finding).
  Real dissolution is upstream at src/v2/05_emit.dag:996, 1046 —
  refactor to produce Diagnostic + halt instead of emitting
  target-specific sentinels.
- Named trigger: when those two call sites are refactored to
  Diagnostic + halt, error_type_template becomes unreachable.
- Cross-ref: PR #657 investigation receipt.

**Row: algebra.dag declaration-vs-template (G reclassification).**
- Was: "derive *_templates() from the type declaration"
- Now: templates carry per-method metadata (size_effect,
  cost_shape, callback_element_position) declarations can't
  (G finding). Not redundant authorities — separate structural
  layers.
- Named trigger: when Lane E substrate-carrier-port design lands
  a chosen option for per-method metadata carriers, *_templates()
  converges to the chosen form.
- Cross-ref: PR #654 investigation receipt + Lane E coordination
  note.

**Row: browser.dag typed-carrier collapse.**
- Was: "route service ops through declared carriers"
- Now: same description, but named trigger added — "when transport
  layer can consume typed carriers end-to-end." Lane H PR #658
  pilots the pattern; success unblocks LLM + GitHub dissolutions
  that consume the same pattern.

All three rows now have checkable dissolution triggers per
INVARIANTS.md P5 tracked-debt discipline. Two rows additionally
have their dissolution paths correctly pointed upstream rather
than at surface symptoms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@briansrls
briansrls marked this pull request as ready for review April 22, 2026 17:56
@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: c5cbf0c4 · Trigger: schedule
  • Thinking: 76s wall

This is a tiny, well-scoped diff: 20 lines in dsl/extdeps/browser.dag that (1) convert three previously-opaque handle types into branded String aliases so shell-transport argv can interpolate them, and (2) narrow stringly-typed inputs/outputs (context_id: String → context: BrowserContext; url: String → url: Url).

Checks against the rubric:

  • Branded-string pattern is established. dsl/std/types.dag:245-300,457-459 uses the exact type X = Y where brand("X") form (PathSegment, ToolHandle, FilesystemHandle, etc.), so browser.dag:32-34 is consistent idiom.
  • Url import is correct. browser.dag:17 already imports Url from std.types, and Url is defined at dsl/std/types.dag:234.
  • "Illegal states unrepresentable" is advanced. Replacing raw String with disjoint brands (BrowserContext, Url) narrows what the type system accepts — a direct win against the modeling-discipline lens.
  • Consumer is unaffected. wip/chatgpt_reviewer.dag never calls browser.Context.Launch/Close and never threads Page/Element handles, so the Launch/Close signature change has no call-site impact in-tree.

Observations (non-blocking, not findings):

  • type Page and type Element are now branded but still never appear as input/output on any browser.Page.* or browser.Element.* operation — the stateful-runner design uses selectors and an implicit current page. Declaring them is harmless but currently aspirational. If the intent of this PR is "make handles type-safe," a natural follow-up is to actually thread context: BrowserContext / page: Page through the page/element ops so the type does work. Worth raising as future work, not blocking here.
  • BrowserConfig.headless: Bool vs. Launch.input { headless: String = "false" } remains inconsistent, but that is pre-existing and outside this diff.

Verdict: APPROVE. Small, narrowly scoped type-tightening that makes the shell-transport story explicit and removes some stringly-typed fields. No invariant or coding/testing-discipline violations visible in the diff.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / gpt-5.4
  • Commit: c5cbf0c4 · Trigger: schedule
  • Thinking: 120s wall

Findings

  • [BLOCKING][structural] dsl/extdeps/browser.dag:60, dsl/extdeps/browser.dag:61, dsl/extdeps/browser.dag:67 — narrowing page locations to std.types.Url makes valid browser states unrepresentable, because Url is defined as ^https?:// only. A Playwright page can legitimately be at about:blank immediately after launch, and browser navigation/current location can also surface non-HTTP schemes like data: or file:. That violates INVARIANTS.md P1 (Modeling Faithfulness) and the docs/modeling-discipline.md “illegal states unrepresentable” practice.

Verdict
REQUEST_CHANGES. The branded-handle part looks fine, but the Url tightening changes the transport contract in a way that no longer faithfully models browser state. These fields should stay broad enough to represent real browser locations, or use a broader browser-location type if one exists.

briansrls added a commit that referenced this pull request Apr 22, 2026
…637 (#652)

* WIP: gunbc Director

* docs(roadmap): capture 3 novel debt rows + amend pipeline_authority post-#637

2026-04-22 exploratory analysis (gpt-5-4-pro against main@c9758c8)
surfaced 3 genuinely novel debt items not in ROADMAP. Verified each
against HEAD before adding:

1. **__EMIT_BUG_{0}__ fabrication sentinels** — 3 target emit specs
   (dag, go, python) use sentinel-string fabrication for error-ref
   emission; rust correctly uses compile_error!(). Target behavior
   diverges between fail-closed and fabricated modes. P3 / C-6
   violation. Distinct from generic "TODO" debt — this is specific
   same-PR target-behavior inconsistency.

2. **algebra.dag declaration-vs-template parallel authority** —
   OrderedRing<T> declaration (16 fields) vs ordered_ring_templates()
   (9+clamp) are two authorities for the same surface, already
   drifted. Same pattern for PartialFunction. DISTINCT from the
   already-tracked signature/comment mismatch row — that's prose vs
   declaration (doc drift); this is code vs declaration (parallel
   authority). P2 Boundary Discipline.

3. **browser.dag typed-carrier service-boundary collapse** — same
   class as already-tracked LLM flattening + GitHub auth bypass:
   typed carriers declared in-file, raw String used at operational
   boundary. P1 Modeling Faithfulness / M8 violation.

Plus amended the pipeline_authority row: #637 closed the stage-
bindings portion (structural PipelineStageBinding consumption
added), but pipeline_compile_order_names() at :225-275 still
text-slices the compile-fn body for stage ORDER. That residual is
blocked on substrate capability for ordered-body reflection — named
the trigger explicitly rather than leaving it as generic "unassigned"
follow-up.

ResourceHandle forgeability (cited by the analysis) verified as
already tracked at ROADMAP:138 — no new row needed.

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

* docs(roadmap): correct pipeline_authority amendment — #637 fully resolved it

Codex BLOCKING review on #652 sha 457da80. My earlier amendment
claimed #637 left a stage-order text-slicing residual blocked on
substrate capability for ordered-body reflection. That was wrong.

Verified against src/v3/compiler/src/pipeline_authority.rs:

- ordered_pipeline_stages() IS the authority function (explicit in
  its doc comment: "the declaration order of the bindings in
  pipeline.dag is the ordering authority")
- It reads PipelineStageBinding declarations structurally from the
  Dag (no text-slicing)
- pipeline_compile_order_names() still exists but is called from
  reconcile_with_compile_body() as a DRIFT CHECK, not an authority
  path
- The drift check fails closed if the text-sliced compile-body stage
  order disagrees with the structural authority

So #637 FULLY closed the original P2 debt — authority moved to
PipelineStageBinding declaration order. What remains is a
defensive fail-closed drift check, which is a legitimate
belt-and-suspenders pattern per INVARIANTS P3, not a violation.

Fix: mark the row as RESOLVED. Earlier characterization of a
substrate-capability blocker was a misread — I conflated "text-
slicing exists in this file" with "text-slicing is the authority
path." The two are different shapes.

Lesson captured: authority location matters more than text-form
location. Verify which function IS the authority before claiming
a capability gap.

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

* docs(roadmap): sharpen pipeline_authority RESOLVED row with correct function names

Pro's APPROVE_WITH_COMMENTS on #652 sha 457da80 caught a residual
inaccuracy in my correction commit c7b33ca. I got the framing right
(authority moved, drift check remains) but named the wrong function
as the text-slicing site.

Verified against pipeline_authority.rs post-#637:
- pipeline_compile_order_names() at :185 is a thin wrapper around
  ordered_pipeline_stages(dag).map(.stage_name) — NO text slicing
- compile_body_stage_names_from_source() at :130-180 is the actual
  text-slicing function
- Called only from reconcile_with_compile_body() at :110-128 as
  fail-closed drift check

Updated row to point at the correct function names and line ranges.
Traceability preserved for future readers who grep.

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

* WIP: gunbc Director

* docs(roadmap): add dissolution triggers + reclassify rows per D/F/G escalations

Pro's APPROVE_WITH_COMMENTS on #652 sha 457da80 flagged that the
three new debt rows had end-state dissolutions but no named
triggers, failing the tracked-debt discipline bar (per INVARIANTS
P5 and modeling-discipline §95-106).

Plus: the D/F/G lane escalations (merry-owl-732 stopped pre-PR,
smart-dove-561 PR #657 findings, sunny-bee-588 PR #654 findings)
revealed that two of my three rows were framed wrong — not just
missing triggers, but naming the wrong dissolution target entirely.

Updates:

**Row: __EMIT_BUG sentinels (F rescope).**
- Was: "converge three target specs on native compile-time error forms"
- Now: all four are already fail-closed in native sense (F finding).
  Real dissolution is upstream at src/v2/05_emit.dag:996, 1046 —
  refactor to produce Diagnostic + halt instead of emitting
  target-specific sentinels.
- Named trigger: when those two call sites are refactored to
  Diagnostic + halt, error_type_template becomes unreachable.
- Cross-ref: PR #657 investigation receipt.

**Row: algebra.dag declaration-vs-template (G reclassification).**
- Was: "derive *_templates() from the type declaration"
- Now: templates carry per-method metadata (size_effect,
  cost_shape, callback_element_position) declarations can't
  (G finding). Not redundant authorities — separate structural
  layers.
- Named trigger: when Lane E substrate-carrier-port design lands
  a chosen option for per-method metadata carriers, *_templates()
  converges to the chosen form.
- Cross-ref: PR #654 investigation receipt + Lane E coordination
  note.

**Row: browser.dag typed-carrier collapse.**
- Was: "route service ops through declared carriers"
- Now: same description, but named trigger added — "when transport
  layer can consume typed carriers end-to-end." Lane H PR #658
  pilots the pattern; success unblocks LLM + GitHub dissolutions
  that consume the same pattern.

All three rows now have checkable dissolution triggers per
INVARIANTS.md P5 tracked-debt discipline. Two rows additionally
have their dissolution paths correctly pointed upstream rather
than at surface symptoms.

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

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Url is defined as `String where pattern("^https?://")`, which excludes
legitimate browser locations (about:blank, data:, file:). Revert url /
final_url fields to String. A broader BrowserLocation carrier is
follow-up modeling work. Branded-handle part (BrowserContext/Page/
Element, Launch/Close context threading) retained.

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

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: claude / claude-opus-4-7
  • Commit: 32dc53ed · Trigger: schedule
  • Thinking: 54s wall

Verdict: APPROVE — diff is small and narrowly scoped.

The change converts three opaque handle types (BrowserContext, Page, Element) in dsl/extdeps/browser.dag:32-34 into branded-String refinements, and flows the new BrowserContext type through Launch's output and Close's input (lines 47, 52, 54). The branded-String idiom is already established in the codebase (dsl/std/types.dag:457-459 for FilesystemHandle, NetworkHandle, ToolHandle), so this is consistent application of an existing pattern rather than a new mechanism. The comment at lines 30-31 explains the motivation cleanly: shell transport argv-interpolates a String carrier, brand keeps the types disjoint from raw String at the type level. No invariant, modeling, coding, or testing rule in the pinned context docs is violated.

Exploratory observation (non-blocking): Page and Element are declared but nothing in service browser.Page or service browser.Element actually takes or returns them — those operations thread selectors and a persistent runner session instead. That pre-exists this PR (the opaque declarations had the same issue), so it's not a finding here, but if the intent of branding was to let handles flow between operations, a follow-up that actually plumbs a Page return out of something like Goto (or deletes the unused types) would dissolve the scaffold.

@briansrls

Copy link
Copy Markdown
Contributor Author

Review metadata

  • Provider / model: codex / gpt-5.4
  • Commit: 32dc53ed · Trigger: schedule
  • Thinking: 85s wall

Verdict: APPROVE. This diff looks clean and narrowly scoped: dsl/extdeps/browser.dag moves the browser handles from untyped opaque names to branded String aliases, which improves boundary precision without introducing a parallel authority, and the Launch/Close surface threads that same fact consistently as context. I don’t see a concrete violation of the pinned invariants, coding guidance, or testing discipline in this patch.

@briansrls briansrls left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review metadata

  • Provider / model: codex / gpt-5.4
  • Commit: 32dc53ed · Trigger: schedule
  • Thinking: 250s wall

Non-blocking — Strengths

  • dsl/extdeps/browser.dag BrowserContext/Page/Element now reuse the existing branded-String pattern from std.types, and the Launch->Close handle flow is typed instead of stringly.

✅ Current diff is a clean, scope-respecting extdeps-model change with no remaining blocking concerns.

@briansrls
briansrls merged commit 779ba3e into main Apr 22, 2026
4 checks passed
@briansrls
briansrls deleted the session/vivid-eagle-345 branch June 1, 2026 18:43
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