Skip to content

fix(registration): align dogfood pack lane strategy with config recommendation - #443

Merged
JSONbored merged 2 commits into
JSONbored:mainfrom
galuis116:fix/dogfood-pack-lane-strategy
Jun 7, 2026
Merged

fix(registration): align dogfood pack lane strategy with config recommendation#443
JSONbored merged 2 commits into
JSONbored:mainfrom
galuis116:fix/dogfood-pack-lane-strategy

Conversation

@galuis116

Copy link
Copy Markdown
Contributor

Summary

buildSelfDogfoodRegistrationPack (src/services/self-dogfood-registration-pack.ts) derived directPrFirst from the registration readiness report's current-lane mode, but the same pack also returns the config recommendation. The two diverge, so the pack's contributorLaneStrategy text and directPrFirst flag could contradict the gittensorConfigRecommendation shown beside them. Closes #442.

// before
const issueDiscoveryReady = readiness.issueDiscoveryReadiness.ready && readiness.issueDiscoveryReadiness.recommendation === "enabled";
const directPrFirst = !issueDiscoveryReady && readiness.recommendedRegistrationMode !== "issue_discovery";

readiness.recommendedRegistrationMode reflects the repo's current lane (laneToMode(lane)), while the recommendation reflects the advised config (participationMode is direct_pr unless intake + config are excellent). So a repo currently registered for issue discovery but with degraded health gets recommendedRegistrationMode: "issue_discovery" -> directPrFirst: false -> "Issue-discovery intake is strong enough to keep a bounded issue-discovery lane", while the same pack recommends participationMode: "direct_pr". The inverse also happens (an excellent direct-PR repo recommended split reported directPrFirst: true).

Scope

  • src/services/self-dogfood-registration-pack.ts -- derive directPrFirst = recommendation.recommended.participationMode === "direct_pr" so the lane strategy text and flag always match the recommendation in the same pack (removed the now-unused readiness-based computation).
  • test/unit/self-dogfood-registration-pack.test.ts:
    • Corrected the excellent-config fixture test: its recommendation is split, so directPrFirst is now false (matching the recommendation) -- the old assertion true encoded the contradiction.
    • Added fail-on-revert: a currently-issue-discovery repo whose recommendation is direct_pr must report directPrFirst: true and direct-PR-first text (old code returned false).

Validation

  • npx tsc --noEmit -- clean.
  • npx vitest run for the dogfood pack + route suites -- 16/16.
  • Full suite -- 1208 passed, 1 skipped (excluding the two unparseable upstream test files and one unrelated mcp-cli timeout that passes in isolation).
  • Branch coverage 97.02% (above the 97% gate).

Safety

  • No response-shape change; only the (now consistent) directPrFirst flag and contributorLaneStrategy text change, and only when the readiness current-lane mode diverged from the recommendation.
  • The recommendation already drives the pack's config tradeoffs, so the lane strategy now agrees with the rest of the pack rather than contradicting it.

@galuis116
galuis116 requested a review from JSONbored as a code owner June 6, 2026 11:20
@dosubot dosubot Bot added the size:XS label Jun 6, 2026
@github-actions github-actions Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jun 6, 2026
@ghost

ghost commented Jun 6, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #443 is no longer open. No action.

Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.

@JSONbored JSONbored left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@galuis116 this is good to land.

A few notes:

  • directPrFirst now follows the recommendation shown in the same pack instead of mixing in current-lane readiness state.
  • The tests cover both the excellent split-lane case and the degraded issue-discovery-to-direct-PR case.
  • This resolves #442 cleanly.
  • No code changes requested.

@dosubot dosubot Bot added the lgtm label Jun 7, 2026
@JSONbored
JSONbored merged commit 3209070 into JSONbored:main Jun 7, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Self-dogfood pack lane strategy contradicts its own config recommendation

2 participants