Skip to content

C2c2: Arrangement end marker + render eligibility QML (#1080) - #1166

Merged
jannekbuengener merged 2 commits into
mainfrom
feat/1080-c2c2-end-marker-render-eligibility
Oct 18, 2026
Merged

jannekbuengener merged 2 commits into
mainfrom
feat/1080-c2c2-end-marker-render-eligibility

Conversation

@jannekbuengener

Copy link
Copy Markdown
Owner

Slice C2c2 — End Marker + Render Eligibility (QML arrangement shell)

Refs #1080

Test-first C2c2 slice: Python-owned arrangement end marker projected on the C2c1 timeline, mutated via domain authority (set/clear/nudge with quarter-note snap), with render eligibility gating.

Commits

Scope

  • \src/arrangement_domain.py: \ArrangementError(ValueError), _marker/_snapped_marker\ domain authority
  • \src/workbench_arrangement_qml.py: \ArrangementEndMarkerProjection, \ArrangementEndMarkerSetResult, \snap_end_marker_qn, \preview_end_marker_snap, \project_end_marker,
    equest_end_marker_set/clear/nudge\
  • \src/workbench_qml.py: end-marker props/slots, fail-soft projection in _refresh, end-marker visual on \�rrangementUpperStage\ (Python-owned; no QML drag surface)
  • Tests: \ ests/test_workbench_arrangement_qml_1080_c2c2.py\ (48 passing), C2b regex scope guard updated, C2c1 stale no-marker test replaced by \ est_end_marker_python_owned_no_qml_drag_surface\

Validation

  • C2c2 suite: 48 passed
  • C2b + C2c1 focused: 86 passed
  • Full local validation run (22 test files): 500 passed, 1 failure
  • Ruff: all checks passed
  • \git diff --check\ (slice commits): clean

Pre-existing failure (not this slice)

\ ests/test_workbench_qml_transport_header.py::test_runtime_qml_header_projects_live_transport_and_commands\ (\�ctive_screen 'screen1' != 'screen2') reproduces identically on main (\�327d690) — verified via a detached worktree before attributing it. This slice touches no channel-rack/active-screen code path.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T00:14:09.513935Z c5b3e0d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

object.__setattr__(self, "end_marker_qn", _marker(self.end_marker_qn))

P2 Badge Reject unsnapped markers during state construction

When an ArrangementState is directly constructed or produced with dataclasses.replace, this now accepts an end marker such as 3 even though set_end_marker() and from_payload() reject it. Such a state can report render_eligible=True, and WorkbenchSession.set_arrangement_state() will accept and serialize it, after which the next arrangement_state read fails while parsing the unsnapped payload. Keep the bar-snap invariant in __post_init__ (or enforce it in validate and eligibility) so every public construction path remains consistent.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/workbench_qml.py
Comment on lines +6419 to +6421
x: window.arrangement.endMarkerNormalizedPosition * parent.width
width: 2
visible: window.arrangement.endMarkerVisible

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Clamp lead-margin markers to the viewport edge

When the marker is within the newly allowed two-block lead margin to the left of the viewport, its normalized position is negative while endMarkerVisible is true. Multiplying that value directly by the stage width places the marker outside the stage—for example, marker 96 with viewport 200..560 gets x ≈ -0.289 * width—so the marker the projection explicitly promises to show is either invisible or bleeds outside its container. Clamp the rendered position to the left edge, or stop marking negative normalized positions visible.

Useful? React with 👍 / 👎.

Comment on lines 628 to 630
forbidden_patterns = [
r'\btimeline\b', r'\bTIMELINE\b',
r'\bendMarker\b', r'\bend_marker\b', r'\bEndMarker\b',
r'\brenderEligibility\b', r'\brender_eligibility\b',
r'\bLive\b', r'\bLIVE\b', r'\bMIDI\b', r'\bmidi\b',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the frozen C2b scope assertions

This file declares itself a frozen C2b contract, but this change silently removes the end-marker and render-eligibility patterns from its scope-creep check while the test's own description still says those concepts are forbidden. That weakens a historical contract to accommodate the implementation instead of preserving it and proving the new C2c2 behavior in the new test suite; retain the frozen assertions or explicitly establish the contract's supersession without editing the frozen test.

AGENTS.md reference: tests/AGENTS.md:L18-L24

Useful? React with 👍 / 👎.

@jannekbuengener
jannekbuengener merged commit 5fd09ec into main Oct 18, 2026
11 checks passed
@jannekbuengener
jannekbuengener deleted the feat/1080-c2c2-end-marker-render-eligibility branch October 18, 2026 00:20
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