GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(schema): validate variants on the alias path and settle chains at the depth limit by dezren39 · Pull Request #403 · developing-today-forks/opencode

Conversation

@dezren39

@dezren39 dezren39 commented Oct 24, 2026 •
edited by blacksmith-sh Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Fixes #398 and #399 — two defects in the same ModelAlias.resolveRef loop in packages/schema/src/model-alias.ts, landed as one set.

#398 — alias path accepted invalid variants

Problem: with aliases configured, the loop path recorded the variant from the first # with no validation, so openai/gpt-4o# silently dropped its empty variant and openai/gpt-4o#high#extra kept high#extra as the variant — while the no-alias parseRefString path throws for both.
Solution: validate every variant extracted in the loop (including variants arriving via alias targets, since targets re-enter the loop as current): empty or containing a second # throws Invalid model reference: <ref>, the same error as the no-alias path.

#399 — chain settling exactly at the depth limit threw AliasMaxDepthError

Problem: the post-loop check depth >= MAX_DEPTH could not distinguish a settled break from exhaustion, so a 9-hop chain (9 expansions + 1 settling iteration = depth 10) was rejected despite resolving; the effective limit was 8 hops.
Solution: track settlement explicitly (settled set at each loop break); throw AliasMaxDepthError only when the loop exits unsettled. Boundary stays exactly at MAX_DEPTH: 9 hops resolve, 10 hops throw. Cycle detection unchanged.

Tests

New tests 15-19 in packages/core/test/model-alias.test.ts: empty variant, second-# variant, invalid variants via alias targets (empty and double-#), 9-hop chain resolves, 10-hop chain throws AliasMaxDepthError.

  • bun test test/model-alias.test.ts (packages/core): 19/19 pass.
  • Neighbour suites session-runner-model.test.ts + model-resolver.test.ts: 57/57 pass.
  • GitHub Actions runs remain repo-wide absent (CI: GitHub Actions has created no workflow runs repo-wide since 2026-10-23T00:13Z #365); merging on local verification per sweep precedent.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with eyes emoji
All reactions
  • 👀 1 reaction
@dezren39
fix(schema): validate variants on the alias path and settle chains at…
25bd010
… the depth limit
@coderabbitai

coderabbitai Bot commented Oct 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8ae5c5b2-1571-41d2-8076-080d3f109b1c
Commits

Reviewing files that changed from the base of the PR and between 9c56957 and 25bd010.

Files selected for processing: 2
  • packages/core/test/model-alias.test.ts
  • packages/schema/src/model-alias.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 24, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-10-24T21:28:40.157017Z 25bd010 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dezren39
dezren39 merged commit bca2f2e into main Oct 24, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@dezren39 dezren39 mentioned this pull request Oct 24, 2026
fix(schema): ModelAlias throws AliasMaxDepthError for a chain that settles exactly at the limit — 9-hop chain rejected, effective limit is 8 #399
Closed
5 tasks
@dezren39
dezren39 deleted the sweep/398-399-model-alias-validation branch October 24, 2026 21:31
This was referenced Oct 24, 2026
docs: ROADMAP Done table omits the #397, #389 and #398/#399 completions (PRs #400, #401, #403) #404
Closed
docs: record the #397, #389 and #398/#399 completions in ROADMAP Done #405
Merged
fix(schema): ModelAlias variant alias target is never validated — empty or #-containing target yields a malformed ref #406
Closed
docs: ROADMAP Done table omits the #404 completion (PR #405) #408
Closed
docs: record the #404 completion in ROADMAP Done #409
Merged
fix(schema): validate provider and variant alias targets #410
Merged
@dezren39 dezren39 added the audit:complete PR fully implemented spawning issue label Nov 24, 2026
@developing-today-fleet developing-today-fleet Bot mentioned this pull request Nov 24, 2026
fix(schema): ModelAlias alias path accepts invalid variants the no-alias parser rejects — empty variant dropped, second # kept #398
Closed
5 tasks
@dezren39 dezren39 mentioned this pull request Nov 24, 2026
AUDIT-7 Lane 2 — Closed-Issues Review (past month, since 2026-10-23) developing-today/code#13878
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

audit:complete PR fully implemented spawning issue

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

fix(schema): ModelAlias alias path accepts invalid variants the no-alias parser rejects — empty variant dropped, second # kept

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@dezren39
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.