Skip to content

feat(sequencing): focus marker derives critical path to a goal, surfaces it atop ready (links-sequencing-21sy.2)#200

Merged
brandon-fryslie merged 1 commit into
masterfrom
links-sequencing-21sy.2_focus-marker
Jun 10, 2026
Merged

feat(sequencing): focus marker derives critical path to a goal, surfaces it atop ready (links-sequencing-21sy.2)#200
brandon-fryslie merged 1 commit into
masterfrom
links-sequencing-21sy.2_focus-marker

Conversation

@brandon-fryslie

Copy link
Copy Markdown
Collaborator

Summary

Implements links-sequencing-21sy.2 — the focus marker ("temporarily urgent"): marking a (possibly-blocked) goal ticket with the reserved label focus surfaces its unfinished critical path at the top of ready/queue/next, so work flows toward the goal.

Design (per the epic's law-forced shape)

  • Stored fact [LAW:one-source-of-truth]: the focus label lives on the ONE goal ticket (the needs-design reserved-label pattern). Path membership is never written onto chain members — it is re-derived from the dependency DAG on every gather, so the path auto-advances as items close with zero state to sync.
  • Derivation: fetchFocusPathGoals BFSes the prerequisite closure: unfinished explicit deps ∪ unfinished children of containers ∪ earlier same-lane unfinished siblings. The intra-epic edge is the lane gate's exact rule, shared via the newly extracted isEarlierSameLaneSibling predicate [LAW:single-enforcer] — membership gate and ordering derivation cannot drift.
  • Neutral fact: new annotation kind focus_path (message = goal ID). Deliberately not in readyBlockingKinds: ordering only, never membership — a blocked path item stays blocked [LAW:one-type-per-behavior].
  • Ordering [LAW:dataflow-not-control-flow]: sortByFocusPath is one more stable-sort layer, placed last in the shared gather so focus-path items sort above standing urgent (the ticket's chosen precedence; flipping it is a one-line reorder). No conditionals in dependency resolution; sortByPriority untouched.
  • Urgent priority alone still does NOT propagate.

Verification

  • New pipeline tests: focused blocked goal pulls the earliest ready prerequisite above unrelated urgent work; the path advances as each item closes; removing focus restores normal order; urgent alone doesn't propagate; focusing an epic expands its children; explicit deps traverse transitively; focus never unblocks a gated member.
  • go test ./... clean.
  • Live smoke (scratch workspace): before focus → urgent on top; after lit label add <goal> focus → Step 1 on top, lit next returns it; close Step 1 → next returns Step 2; lit label rm → urgent back on top.

Closes links-sequencing-21sy.2.

…ces it atop ready (links-sequencing-21sy.2)

Marking a goal ticket with the reserved label `focus` makes ready/queue/next
surface its unfinished prerequisite chain at the top, auto-advancing as items
close. The fact is stored on the one goal ticket only; path membership is
derived from the dependency DAG on every gather (explicit deps, container
children, earlier same-lane siblings — the lane gate's rule, shared via the
extracted isEarlierSameLaneSibling predicate). FocusPath is a neutral ordering
annotation, deliberately absent from readyBlockingKinds: blocked path items
stay blocked. sortByFocusPath layers last in the shared gather so focus
outranks standing urgent priority, which still never propagates.

@github-actions github-actions 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.

Z.ai Coding Agent Review

The focus-path feature is well-structured and law-abiding. Key strengths:

  • [LAW:single-enforcer] isEarlierSameLaneSibling and isUnfinished are extracted as shared predicates used by both the membership gate and the focus-path BFS, eliminating the drift risk that would exist if each consumer defined its own "earlier sibling" or "unfinished" check.
  • [LAW:one-source-of-truth] The focus label is stored on the single goal ticket only; chain membership is derived from the DAG on every gather, never persisted.
  • [LAW:dataflow-not-control-flow] The annotator is a pure map lookup for every issue; the sort comparator runs uniformly over every pair. No mode flags gate whether the operation runs.
  • [LAW:behavior-not-structure] The tests assert ordering and annotation contracts, not internal wiring.

No must-change items found. One pre-existing pattern worth noting: the layered stable-sort calls (sortByCompositeRanksortByPrioritysortByFocusPath) rely on call order for correct precedence. This is explicitly documented and is the established pattern in the codebase, so it's not introduced by this diff — but it is ambient temporal coupling that a future refactor could make structural (e.g., a sort-spec slice).

✅ Approved

@brandon-fryslie brandon-fryslie merged commit 2e43115 into master Jun 10, 2026
6 checks passed
@brandon-fryslie brandon-fryslie deleted the links-sequencing-21sy.2_focus-marker branch June 10, 2026 07:33
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