Skip to content

fix(mothership): strip unknown resource owner keys and tighten contract follow-ups - #10376

Open
waleedlatif1 wants to merge 5 commits into
stagingfrom
fix/mothership-contract-followups
Open

waleedlatif1 wants to merge 5 commits into
stagingfrom
fix/mothership-contract-followups

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • A resource frame whose owner carries a key a newer worker added was rejected by Sim's resource check (ResourcePayload, which ends the turn), because the resource owner reused the strict file-owner schema. The synced worker contract now strips unknown owner keys there; the inbound file-owner schemas stay strict. Copies of the worker's resources.ts and mothership-stream-v1.ts (paired mothership PR follows)
  • The stream validator's comment said the server performs strict schema validation; it is the one verdict on every frame (worker ingest, Redis reads, browser), and the generated schema only shadows it on ingest
  • The shadow test for "schema accepts what the validator rejects" used a mocked rejection; it now runs the real validator on a real frame that splits the two (run compaction_start with activityReceipt: null)
  • The unknown-model error suggested "ollama/llama3.1:8b" even where Ollama cannot run (hosted without Ollama, or Ollama blacklisted), steering a writer to an id that fails at execution. The Ollama example is now offered only where Ollama is available

Type of Change

  • Bug fix

Testing

  • validation-models.test.ts: the hint includes the Ollama example on self-hosted with Ollama and omits it on hosted and with Ollama blacklisted; fails on the previous code
  • contract-shadow.test.ts: real-frame schema_accepts case, with the contract mock removed so every case runs the real validator
  • tsc --noEmit, biome, comment-hygiene and test-pattern checks clean; targeted vitest passes

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

…tes from the worker

A resource frame whose owner carries a key a newer worker added no longer fails Sim's resource check (ResourcePayload): the owner now strips unknown keys. Copies of worker/packages/contracts resources.ts and mothership-stream-v1.ts.
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 24, 2026 7:45pm UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

@greptile-apps

greptile-apps Bot commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

This PR lets resource owners carry extra keys without rejecting the stream frame.

  • Resource frames accept owner fields from newer workers.
  • Stream contract notes and shadow tests match the validator's real behavior.
  • Unknown-model hints show the Ollama example only where Ollama is available.

No actionable issues found. This review checked the code; it did not run tests.

Reviews (1) · Last reviewed commit: "fix(mothership): sync the resource owner..." · Reviewed by Greptile

This branch was previously deployed

1 inactive deployment
Preview — c81cdbe0 Deployed Nov 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant