Skip to content

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

Merged
waleedlatif1 merged 5 commits into
stagingfrom
fix/mothership-contract-followups
Nov 24, 2026
Merged

waleedlatif1 merged 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] The PR appears safe to merge, with no actionable findings from this review.

Summary

The PR allows unknown resource-owner keys, uses a real frame to test schema disagreements, and limits the Ollama example to deployments where Ollama is available.

  • Resource frames accept owner details added by newer workers.
  • The stream shadow test checks a real validator disagreement.
  • Unknown-model hints show Ollama only where it is available.

Reviews (2) · Last reviewed commit: "docs(mothership): note that resource pay..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptileai review

@waleedlatif1
waleedlatif1 merged commit fb545bd into staging Nov 24, 2026
83 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/mothership-contract-followups branch November 24, 2026 21:02

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