Repository navigation
fix(#511): raise completion generation cap to 5 to match Nexus-new loop - #512
Merged
James3014 merged 3 commits intoOct 13, 2026
Merged
Conversation
…m (5) RED on nexus/connector-host-v1@528dc50: missing export and the advertised maxGenerations maximum is 3, not 5. Refs James3014/Nexus-new#1384 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
One host constant MAX_COMPLETION_INTEGRATION_GENERATIONS=5 mirrors Nexus-new MAX_INTEGRATION_GENERATIONS and drives the parser default and max, both port generation guards, the proxy schema .max() and its description, and the bridge fallback. revalidate_affected_dimension is unchanged and still fails closed for every dimension. Refs James3014/Nexus-new#1384 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Refs James3014/Nexus-new#1384 Co-Authored-By: Claude Opus 5.5 (1M context) <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.
Part of #511 (host side of James3014/Nexus-new#1384). This PR fixes only gap 1, the generation budget, so #511 stays open for gap 2.
Base:
nexus/connector-host-v1@528dc50a· Head:4360d0b3What changes
MAX_COMPLETION_INTEGRATION_GENERATIONS = 5insrc/github-completion-host.ts. It mirrors Nexus-newMAX_INTEGRATION_GENERATIONS/DEFAULT_MAX_INTEGRATION_GENERATIONS(main7e1e3452).parseGitHubCompletionToolInputdefault and max (was 3)materialize_integration_headandread_required_checks, through the new exportedparseCompletionGeneration(waspositiveInt(..., 3))github_complete_pull_requestschemamaxGenerations .max()and its "at most N" description insrc/nexus-gateway-proxy.tsscripts/github_completion_bridge.py: the fallbackmax_generationschanges from 3 to 5. The host always sends this value; the fallback is only a backstop.revalidate_affected_dimensiondoes not change. Every dimension, TEST_IMPACT included, still fails closed withrequires_fresh_candidate_acceptance: true.RED, then GREEN
528dc50:github-completion-host.test.tsfailed on the missing export, and the proxy schema test failed withactual: 3, expected: 5.npm run typecheckis clean andnpm testpasses (exit 0).Why TEST_IMPACT revalidation is not in this PR (design questions)
Doing it safely is not a bounded host change. The Nexus-new contract needs answers first:
port.revalidate_affected_dimension(...)beforematerialize_integration_head, so the exact integration head I_n does not exist yet. The host could test a locally computedmerge-tree(last_produced_head, new_main)tree. But the receipt binds onlyold/new_main_shaandsource_candidate_*, and the loop never checks a revalidation tree againstmat_result.integration_tree_sha. Passing would therefore not be mechanically bound to the head that gets checked and merged. Options: move the hook after materialization, or addintegration_tree_shatoDimensionRevalidationReceiptand have the loop compare them.requalify_main_movementreturns TEST_IMPACT with only a fixed reason string. It does not expose thebuild_impact_plan(...).pytest_targetsit computed, and the bridge passes no target list. If the host computed its own selection, a second selection authority would appear. The selection should come from Nexus-new, either in the dimension result or in the hook parameters.pyproject.toml/uv.lockchanges. The host runs pytest with a fixedNEXUS_PYTHON_BINvenv, which would be stale for exactly those movements. Who builds or attests the environment for the new lockfile? Or should dependency changes stay fail-closed?Note for review (not changed here)
The port guard caps the absolute
generation(current_generation + 1). The loop, however, budgets relative tostart_generation. When a PR is already at I3 and a later loop run starts, it gets only two more generations before the host rejects I6, even though the loop would allow five. That is the same behaviour as before, with a higher ceiling. Making it relative would need the host to learnstart_generation.No merge, deploy, rebuild or runtime activation is part of this PR.
🤖 Generated with Claude Code