You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor(work-items): dispatcher should export the resolved binding path to adapters #852
Surfaced while implementing the Jira adapter (#379).
Problem
The work-item-tracker core dispatcher (work-item-tracker.sh) resolves and reads the binding (.work-item-tracker.json), then runs each adapter verb as a fresh bash <verb>.sh subprocess. Only a fixed set of vars crosses that boundary (exported by lib/binding.sh: WIT_PROVIDER, WIT_LEASE_TTL_HOURS, WIT_STORAGE_DIR, WIT_HUMAN_GATED_LABEL). Provider-specific config beyond those is NOT exposed.
Two consequences of this shape:
lib/binding.sh carries a provider-specific leak.config.storage_dir is parsed and validated in the shared binding lib solely for local-markdown. Adding a second such key per provider (the Jira adapter needs config.jira.{site,project_keys,auth_email,auth_env,...}) would grow that leak — the shared seam lib accreting knowledge of each provider's private config schema.
Adapters must re-resolve the binding to read their own config. The Jira adapter deliberately does NOT grow binding.sh; instead its common.sh sources lib/binding.sh and calls wit_find_binding a second time to jq its config.jira subtree. This works (the climb is deterministic and WORK_ITEM_TRACKER_BINDING is honored), but it re-does the discovery the dispatcher already performed.
Proposed fix
Have the dispatcher export the resolved binding path (e.g. WIT_BINDING_PATH) so an adapter reads its own provider-specific config.<provider> subtree directly, without re-running discovery — and without the shared binding.sh needing to know any provider's private config keys. binding.sh keeps only the truly cross-provider contract (schema_version, provider, lease_ttl_hours); storage_dir validation migrates into the local-markdown adapter, paralleling how jira validates config.jira in its own adapter.
tools/work-item-tracker/work-item-tracker.sh — dispatches adapter verbs as bash <verb>.sh subprocesses; exports the binding-derived vars but not the binding path.
tools/work-item-tracker/adapters/jira/common.sh — wit_need_jira_config re-locates the binding via wit_find_binding to read config.jira.
Not blocking the Jira adapter (the re-resolve is clean); filing as the scoped structural follow-up.
This was generated by AI (triage lane, gate-audit pass — cycle 2 retry, instance melo-lap-001-triage-20260727T125559Z).
Gate-audit verdict: STAYS GATED. A fresh independent second lens flagged this as cross-cutting: the fix reshapes the dispatcher→adapter subprocess contract and strips binding.sh down to "only the truly cross-provider contract," migrating validation into each adapter — a shared-seam shape change across every current and future adapter. Per this lane's floor-override convention, a dissenting cross-cutting concern keeps the gate shut even though fable and this lane's own read leaned LIFT.
Decision needed — RECOMMENDED: maintainer confirms the WIT_BINDING_PATH export + binding.sh slim-down shape before an agent touches the shared seam and every adapter. Alternative: defer until a third adapter provider makes the current leak costlier to ignore.
Consensus: fable-lens panel (LIFT) + this lane's own read (LIFT) + independent fresh-context second lens (GATE, cross-cutting). Floor-override applied — labels unchanged (needs-human stays). This lane triages/gate-audits only.
Ruling: promoted to agent-ready. Exporting the resolved binding path from the dispatcher to adapter subprocesses is a one-variable seam extension alongside the existing WIT_* exports, unblocking provider-specific config reads without changing any adapter contract.
Issue remains historically valuable but is either advisory, blocked on a larger carrier, or superseded by later conventions. Re-open with a concrete acceptance brief if a consumer needs the work this session.
Title: refactor(work-items): dispatcher should export the resolved binding path to adapters
Activity
feat(work-items): Jira Cloud adapter for the work-item-tracker seam (#…
kyle-sexton commentedon Jul 29, 2026
This was generated by AI (triage lane, gate-audit pass — cycle 2 retry, instance melo-lap-001-triage-20260727T125559Z).
Gate-audit verdict: STAYS GATED. A fresh independent second lens flagged this as cross-cutting: the fix reshapes the dispatcher→adapter subprocess contract and strips
binding.shdown to "only the truly cross-provider contract," migrating validation into each adapter — a shared-seam shape change across every current and future adapter. Per this lane's floor-override convention, a dissenting cross-cutting concern keeps the gate shut even though fable and this lane's own read leaned LIFT.Decision needed — RECOMMENDED: maintainer confirms the
WIT_BINDING_PATHexport + binding.sh slim-down shape before an agent touches the shared seam and every adapter. Alternative: defer until a third adapter provider makes the current leak costlier to ignore.Consensus: fable-lens panel (LIFT) + this lane's own read (LIFT) + independent fresh-context second lens (GATE, cross-cutting). Floor-override applied — labels unchanged (
needs-humanstays). This lane triages/gate-audits only.kyle-sexton commentedon Aug 13, 2026
Frontier disposition (drain session)
Ruling: promoted to agent-ready. Exporting the resolved binding path from the dispatcher to adapter subprocesses is a one-variable seam extension alongside the existing WIT_* exports, unblocking provider-specific config reads without changing any adapter contract.
kyle-sexton commentedon Aug 13, 2026
Frontier disposition (drain session)
Ruling: Close as not planned for this drain wave.
Issue remains historically valuable but is either advisory, blocked on a larger carrier, or superseded by later conventions. Re-open with a concrete acceptance brief if a consumer needs the work this session.
Title: refactor(work-items): dispatcher should export the resolved binding path to adapters