feat(config): config-driven tracker backend via rig.yaml task: block#7
Merged
Merged
Conversation
…lt github) task-cli now reads its per-repo tracker backend from the repo's committed rig.yaml — the single source of truth for the agent toolchain — via a flat `task:` block (CTO decision #4136.4: hyperide -> Linear/HYP, every other repo -> GitHub Issues by default). The cascade is defaults -> global -> rig.yaml task: -> task.yaml -> --config, so a repo keeping a native task.yaml is untouched, and a repo with only a rig.yaml task: block needs no task.yaml. The block is flat: `team`/`project`/`repo` are shorthands translated onto task-cli's own shape; full sections may be nested verbatim and deep-merge with the shorthands (order-independent; a true leaf collision is a hard error). rig.yaml is a FOREIGN file owned/evolved by rig-cli, so the read is forward-compatible: a parse error or non-mapping root falls through to the github default (logged, never fatal), and an unknown sub-key under task: is warned-and-ignored rather than crashing every `task` command. `version` is not passed through (rig.yaml has its own top-level version). validate() now type-guards a non-string backend into a clean ConfigError instead of an unhashable-type TypeError on foreign input. Tests: default=github, rig.yaml override=linear, missing/inert/broken/non-mapping rig.yaml=github, flat+nested merge for both linear and github (both orders), leaf-conflict rejected, unknown-key and stray version tolerated, malformed backend value -> clean error. Smoke covers the rig.yaml->linear/HYP path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 46143068af
ℹ️ 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".
…ig-managed repo
The rig.yaml load only caught ConfigError, so in a repo that merely CONTAINS a
rig.yaml, a missing PyYAML (the installer can continue without it, promising
built-in defaults) made `task list` traceback with ModuleNotFoundError from the
lazy `import yaml` in _load_yaml instead of ignoring the unreadable foreign file.
Catch ModuleNotFoundError for the yaml import in that block and treat it the same
as the unreadable/invalid rig.yaml path: warn-and-ignore, fall through to the
built-in GitHub-Issues default. Scoped by exc.name (yaml / _yaml / yaml.*) only,
never the message, so an unrelated missing module whose name merely contains
"yaml" (e.g. yaml_processor) still surfaces; ModuleNotFoundError (not the broader
ImportError) so a circular/broken-init error is not swallowed. The tolerance stays
rig.yaml-only — task-cli's own task.yaml/global remain fail-closed. Shared the
warn-and-ignore via _ignore_rig and corrected the message ("not loaded" vs
"unreadable" — a missing-PyYAML file is readable, just unparsed).
Regression tests: rig.yaml present + yaml stubbed out of sys.modules -> backend
falls back to github default, no exception, WARN logged; yaml submodule
(_yaml / yaml.cyaml) missing -> same fall-through; an unrelated/substring-collision
ModuleNotFoundError (yaml_processor) still propagates.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Wires task-cli's tracker backend selection to be config-driven from the repo's
rig.yaml(CTO decision #4136.4: "for hyperide a LOCAL rig.yaml setting -> Linear, default -> GitHub Issues").task-cli now reads its per-repo tracker backend from a flat
task:block in the repo's committedrig.yaml— the single source of truth for the agent toolchain:Design
task:block (or norig.yaml) -> clean fall-through togithub-issues.rig.yamltask: ->task.yaml->--config. A repo keeping a nativetask.yamlis untouched (it still wins overrig.yaml).team/project/repoare shorthands; fullgithub:/linear:/enforce:/classify:/session:/projects:sections may be nested verbatim and deep-merge with the shorthands (order-independent; a true leaf collision is a hard error).task:is warned-and-ignored, not a crash;versionis not passed through (rig.yaml has its own top-level version);validate()type-guards a non-stringbackendinto a cleanConfigErrorinstead of an unhashable-typeTypeErroron foreign input.Tests
tests/test_config.py: default=github, rig.yaml override=linear, missing/inert/broken/non-mapping rig.yaml=github, flat+nested merge for both linear and github (both orders), leaf-conflict rejected, unknown-key and strayversiontolerated, malformedbackend-> clean error.tests/smoke.shcovers the end-to-endrig.yaml -> linear/HYPselection. Full suite: 223 passing.Reviewed across models before commit (review-before-commit gate); GLM seat was throttled (429) throughout, so the diff was reviewed on the Opus correctness seat across three rounds — each round's findings fixed (data-loss on flat+nested mix, forward-compat for unknown keys, foreign-file tolerance, non-string backend guard).
🤖 Generated with Claude Code