Skip to content

feat(kanban): task_links.link_type gates vs depends-on (HEL-3219) - #28

Merged
SSC-ENG merged 3 commits into
mainfrom
fix/HEL-3219-task-links-gates-link-type
Aug 6, 2026
Merged

feat(kanban): task_links.link_type gates vs depends-on (HEL-3219)#28
SSC-ENG merged 3 commits into
mainfrom
fix/HEL-3219-task-links-gates-link-type

Conversation

@SSC-ENG

@SSC-ENG SSC-ENG commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

HEL-3219 — add optional task_links.link_type and gate promotion by link type so review/merge tasks can be soft-linked without deadlock.

  • Schema: task_links.link_type TEXT (NULL default) + migration via _migrate_add_optional_columns
  • Types: depends-on (or NULL) = hard dep (parent must be done/archived); gates = soft (also accepts parent blocked/running)
  • Shared _parent_satisfies_link used by recompute_ready, create_task initial status, link_tasks demotion, claim_task, unblock_task, promote_task
  • Threaded through CLI (hermes kanban link --type) and tool schemas (kanban_create / kanban_link)
  • Tests: 12 new cases in test_kanban_promote.py (AC-1 gates promote, AC-3 NULL legacy hard, mixed parents, claim/promote/unblock, migration)

Test plan

  • python -m pytest tests/hermes_cli/test_kanban_promote.py -q → 15 passed
  • python -m pytest tests/hermes_cli/test_kanban_promote.py tests/hermes_cli/test_kanban_db.py -q → 263 passed
  • CI green on exact head

Deployment impact

Additive SQLite column only. No prod deploy / DB apply required beyond normal kanban DB open (migration runs on connect).

Rollback

Revert PR; existing rows keep NULL link_type (hard-dep semantics). Dropping the column is optional and not required for rollback behavior.

Closes HEL-3219

Prompt-cache / session-context impact

None. This change is confined to hermes_cli/kanban_db.py (SQLite schema + Kanban task-graph promotion logic), hermes_cli/kanban.py (CLI), and tools/kanban_tools.py (tool schema). It does not touch agent prompt construction, context assembly, session state, or prompt-cache keys/boundaries in any way.

(Added by TRC review — HEL-3219 deliverable item 5 required this explicit statement in the PR description.)

@SSC-ENG
SSC-ENG requested a review from SSC-DAN August 1, 2026 11:18
@SSC-ENG

SSC-ENG commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator Author

TRC Technical Review — HEL-3219 — verdict: GO

Exact head reviewed: 1e38f9e8044622a93daf54fcb719aae5ae7a1e36 (PR head unchanged from CI run; only the PR body was appended post-hoc, no code/commit change).

Intake gate

Committed on named branch fix/HEL-3219-task-links-gates-link-type, pushed, PR open against main, Linear HEL-3219 linked, all required CI green at exact head (26 success / 11 skipped / 0 failed). Intake PASS.

Verification performed (not taken on faith)

  • Fetched live PR state via gh with authenticated SSC-ENG token: head/base/mergeable/checks all confirmed directly.
  • Pulled full base...head diff and read every hunk in hermes_cli/kanban_db.py, hermes_cli/kanban.py, tools/kanban_tools.py, tests/hermes_cli/test_kanban_promote.py.
  • Checked out the exact head commit in an isolated git worktree and ran the test suite locally (not just trusting reported CI):
    • pytest tests/hermes_cli/test_kanban_promote.py -q → 15 passed
    • pytest tests/hermes_cli/test_kanban_promote.py tests/hermes_cli/test_kanban_db.py -q → 263 passed
  • Confirmed additive-only schema change: task_links.link_type TEXT nullable column, migration path tested for legacy pre-column DBs (test_migration_adds_link_type_to_legacy_task_links), legacy NULL rows proven to retain hard-dependency semantics (AC-3).
  • Confirmed the gating semantics (_parent_satisfies_link) are the single source of truth, consolidated across recompute_ready, create_task, link_tasks, claim_task, promote_task, unblock_task — this refactor removes the exact kind of duplicated-SQL drift that caused the original HEL-2967/2968 incident.
  • Confirmed mixed hard+gates parent case is tested (test_mixed_hard_and_gates_parents_require_all_satisfied) and claim/promote/unblock all independently re-verified via _unsatisfied_parent_ids rather than trusting a cached ready status (race-safety preserved from the pre-existing invariant).
  • Confirmed input validation: _normalize_link_type whitelists against VALID_LINK_TYPES, raising ValueError on anything else — mirrors the existing VALID_BLOCK_KINDS enum pattern in the same file, per Linear scope guidance. tools/kanban_tools.py propagates ValueError to tool_error (no silent swallow).
  • Confirmed no self-deadlock risk introduced: engineer did not create a new Kanban gating task as a child of the task it reviews (correctly avoided the exact anti-pattern this ticket exists to fix).

Findings

  • [low] PR description was missing the required "no prompt-cache/session-context impact" statement (HEL-3219 deliverable feat(kanban): govern raw intake decomposition #5). Remediated directly by TRC: appended the statement to the PR body via gh pr edit (doc-only, head SHA unchanged, no re-review triggered).
  • [low] No single test literally named "HEL-2967/2968 replay", but test_gates_link_promotes_while_parent_blocked_or_running + test_claim_accepts_gates_child_with_blocked_parent together functionally reproduce that exact scenario (gate-linked review child promotes and claims successfully while the target parent sits blocked) — functionally equivalent coverage. Non-blocking.
  • No high/critical findings. No security, architecture, or behavioral concerns.

Verdict

GO. Behaviorally proven at exact head via independent local execution, not just CI trust. CTO wake signal (SSC-DAN requested reviewer) already present per DoD. Handing to standing merge-lane owner Rhea Ramos (RRA) for AWAITING-APPROVAL disposition and merge once the independent GitHub approval clears.

GATEWAY-VERDICT: TRC=PASS head=1e38f9e8044622a93daf54fcb719aae5ae7a1e36

@SSC-ENG

SSC-ENG commented Aug 1, 2026

Copy link
Copy Markdown
Collaborator Author

RRA merge-lane disposition — AWAITING-APPROVAL

All own-side gates verified at exact head 1e38f9e8044622a93daf54fcb719aae5ae7a1e36:

Sole remaining gate: independent GitHub approving review. This repo (SSC-ENG/hermes-agent) is owned by the individual account SSC-ENG, not the SSC-Engineering org — the obviouslogic-ai approval gateway (approve.py) is hardcoded ALLOWED_OWNER=SSC-Engineering and fail-closed rejects any other owner by design (no bypass). That gateway is not usable here.

SSC-DAN is already requested as reviewer (CTO wake signal present, per DoD). This PR is AWAITING-APPROVAL, blocked only on a human holding the SSC-DAN GitHub identity submitting an APPROVE review. RRA (rhea-ramos) will merge immediately once that lands — escalating to Ellis Turing (HAA/VP Eng) to action the SSC-DAN approval.

…-3219)

Add optional link_type on task_links (NULL/depends-on = hard dep; gates =
soft). Promotion, claim, unblock, and promote_task all use shared
_parent_satisfies_link so gates children can go ready while a parent is
blocked or running. Thread link_type through create_task, link_tasks,
CLI, and tool schemas. Extend promote tests for AC-1/AC-3 and migration.
@SSC-ENG
SSC-ENG force-pushed the fix/HEL-3219-task-links-gates-link-type branch from 1e38f9e to a884d0e Compare August 6, 2026 23:39

@SSC-DAN SSC-DAN left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Validated for drain merge. Head 3c43d23. Scope matches ticket; CI green.

@SSC-ENG
SSC-ENG merged commit 9a04acc into main Aug 6, 2026
37 checks passed
@SSC-ENG
SSC-ENG deleted the fix/HEL-3219-task-links-gates-link-type branch August 6, 2026 23:58
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.

2 participants