fix: explain expected reference formats in ref validation errors + omp manifest - #19
Merged
Merged
Conversation
'invalid Forgejo reference' gave the model no way to recover: the ref parameter is a resource reference (server:owner/repo#N / !N / bare repo / fj://...), but agents naturally pass git tags or branches there — especially for forgejo_actions, where filtering runs by a tag is a legitimate intent with its own git_ref parameter. The retry loop that follows wastes turns and tokens. All three validation sites (ForgejoRuntime.resolveRepo, resolveResource, and the /fj command path) now append the accepted formats and point git tags/branches at git_ref, so a single error is enough to self-correct. Observed in a live session: gpt-5.6-sol passed 'v0.21.13-pilot' as ref and spiraled on repeated opaque rejections; with the hint the same request completes on the next try.
Pin the pi entry to the extension file instead of the directory, and declare the same entry under omp so the oh-my-pi fork's native package discovery picks the toolkit up without the legacy path. pi behavior is unchanged (same module, explicit path); omp loads it from its own registry entry.
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.
Problem
Agents routinely pass git tags/branches as the
refparameter — most naturally forforgejo_actions, where "runs for tag vX.Y.Z" is a legitimate request served by the separategit_refparameter. The old error:gave no hint of the accepted formats, so the model retried variations and burned turns. Observed live: gpt-5.6-sol spiraled on repeated opaque rejections (session log:
[forgejo_actions] invalid Forgejo reference 'v0.21.13-pilot').Changes
1. Self-explanatory errors (
runtime.ts,extension.ts) — all three validation sites (resolveRepo,resolveResource,/fjcommand) now append the accepted formats and route git tags/branches togit_ref:One error is now enough for the model to self-correct. Verified live with gpt-5.6-sol: the previously failing request completes on the next attempt.
2. Manifest (
package.json) — pin the pi entry to the extension file and declare the same entry underompso the oh-my-pi fork's native package discovery finds the toolkit. pi behavior unchanged.Verification
tsc --noEmitclean