[WRONG BRANCH] fix(grok): require per-model ownership markers - #398
[WRONG BRANCH] fix(grok): require per-model ownership markers#398luvs01 wants to merge 1 commit into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7575048c7a
ℹ️ 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".
| ? "explicit" | ||
| : "legacy"; | ||
| if (!hasOwnershipMarker && !legacyGenerated && !inheritedOwned) continue; | ||
| if (!hasOwnershipMarker && !legacyGenerated) continue; |
There was a problem hiding this comment.
Restore endpoint checks before adopting legacy Grok models
When an unmarked user table has the legacy-looking alias/name/backend shape and its model ID is emitted by the current catalog, this condition now classifies it as a legacy orphan without checking api_key or base_url. A normal Grok sync will therefore delete and replace even a user-authored remote model such as [model.ocx-gpt-5-6-sol] with api_backend = "chat_completions", name = "OCX gpt-5.6-sol", a remote URL, and a user secret, losing its custom settings. Keep the former OpenCodex-key and loopback-URL checks for the legacyGenerated path, while allowing only the durable per-model marker to bypass them.
AGENTS.md reference: src/AGENTS.md:L10-L10
Useful? React with 👍 / 👎.
⏳ DRAFT
What to do
Its title has been prefixed with |
Motivation
model_provider = "opencodex"plus a predictableocx-<id>alias as deletion authority for outside-fence model tables, allowing a configured upstream to cause user-authored model tables to be removed.Description
findOpencodexOrphansso provider inheritance alone does not mark an outside-fence[model.*]as owned, and require a per-model durable marker (x-opencodex-grok = "1") or the legacy fingerprint to declare explicit ownership.alias+providerexplicit-ownership branch so only a model-local marker (or legacy generated fingerprint) permits deletion.buildGrokManagedBlockso generated models remain removable even if Grok re-serializes them outside the fence while preserving the sharedmodel_providers.opencodexprovider block.tests/grok-orphan-adoption.test.ts,tests/grok-config-inject.test.ts, andtests/grok-attribution.test.ts.Testing
bun test tests/grok-orphan-adoption.test.ts tests/grok-config-inject.test.ts tests/grok-attribution.test.ts, which passed (focused run: 105 tests, 0 failures).bun run typecheckandbun run privacy:scan, both of which succeeded on the environment used for the change.node:zlib.zstdDecompressSyncand failed the focused run; the repository-provided Bun (v1.4.0) was used to produce the green focused test results above.Codex Task