Skip to content

refactor: migrate oracle terminology to script (api, engine, docs)#165

Merged
scasplte2 merged 1 commit into
mainfrom
refactor/script-only-api
Jun 15, 2026
Merged

refactor: migrate oracle terminology to script (api, engine, docs)#165
scasplte2 merged 1 commit into
mainfrom
refactor/script-only-api

Conversation

@ottobot-ai

@ottobot-ai ottobot-ai commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Removes the last "oracle" spellings, completing the script/machine-only surface. "Script" was already the public term; this drops the legacy naming across the HTTP API, the fiber engine, the scripting-language token, the e2e harness, and the docs.

Stacked on #164 (feat/committed-state-migration) — it builds on that branch's ML0Routes (/scripts/estimate-fee, /scripts/state-proof). Re-target to main once #164 merges. Review only the top commit.

Sister PR: ottobot-ai/ottochain-sdk#206 (client paths + ScriptInvocation type). The two are logically paired; ottochain's e2e passes independently (the harness uses direct HTTP + only imports HttpClient-type helpers, not the SDK's OracleInvocation type).

HTTP API (breaking)

  • Remove GET /v1/oracles{,/{id},/{id}/invocations}; serve the same under /v1/scripts (estimate-fee + state-proof were already there).

Serialized / public types

  • FiberLogEntry.OracleInvocationScriptInvocation
  • GasExhaustionPhase.OracleScript
  • FailureReason.OracleInvocationFailedScriptInvocationFailed
  • ScriptRules.OracleNotFound / OracleAccessDeniedScriptNotFound / ScriptAccessDenied
  • Records.lastInvocation, TransactionResult.updatedScripts, plus internal identifiers/comments across models + shared-data + l0.

Scripting-language token (breaking)

  • The cross-fiber call token _oracleCall_scriptCall (ReservedKeys.SCRIPT_CALL). The live tictactoe example, the inline test scripts, and the language docs move in lockstep so the chain and authored scripts agree.

e2e harness

  • All direct /oracles HTTP paths → /scripts; terminal CLI command/flags (oraclescript, --oracle--script, --oracleId--scriptId); example manifests type:"oracle""script"; oracleFiberIdscriptFiberId.

Deliberately preserved (real-world domain, not our terminology)

  • Prediction-market oracle agents (oracleId / oracleReputation / oracleSubmissions) and the market app's "oracles" data field + std-manifest conformance fixture.

Validation

  • All 358 shared-data tests pass; scalafmtCheckAll + scalafixAll --check clean; currencyL0/compile clean.
  • The whitepaper PDF is untracked WIP and must be regenerated from the updated .tex.

🤖 Generated with Claude Code

Base automatically changed from feat/committed-state-migration to main June 15, 2026 19:04
Completes the script/machine-only surface: removes the legacy "oracle"
naming across the HTTP API, the fiber engine, the scripting-language
token, the e2e harness, and the docs. "Script" was already the public
term; this drops the last "oracle" spellings.

HTTP API (breaking):
- Remove GET /v1/oracles{,/{id},/{id}/invocations}; serve the same under
  /v1/scripts (estimate-fee + state-proof were already there).

Serialized / public types:
- FiberLogEntry.OracleInvocation     -> ScriptInvocation
- GasExhaustionPhase.Oracle          -> Script
- FailureReason.OracleInvocationFailed -> ScriptInvocationFailed
- ScriptRules.OracleNotFound/OracleAccessDenied -> ScriptNotFound/ScriptAccessDenied
- Records.lastInvocation, TransactionResult.updatedScripts, internal
  identifiers and comments across models + shared-data + l0.

Scripting-language token (breaking):
- The cross-fiber call token _oracleCall -> _scriptCall
  (ReservedKeys.SCRIPT_CALL). The live tictactoe example, the inline
  test scripts, and the language docs move in lockstep so the chain and
  authored scripts agree.

e2e harness:
- All direct /oracles HTTP paths -> /scripts; terminal CLI command/flags
  (oracle->script, --oracle->--script, --oracleId->--scriptId); example
  manifests type:"oracle" -> "script"; oracleFiberId -> scriptFiberId.

Deliberately preserved (real-world domain, not our terminology):
- Prediction-market oracle agents (oracleId/oracleReputation/submissions)
  and the market app's "oracles" data field + std-manifest conformance.

Pairs with the ottochain-sdk sister PR (client paths + ScriptInvocation
type). The whitepaper PDF must be regenerated from the updated .tex.

All 358 shared-data tests pass; scalafmt/scalafix clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ottobot-ai ottobot-ai force-pushed the refactor/script-only-api branch from 65951b0 to 87a107a Compare June 15, 2026 19:10
@scasplte2 scasplte2 merged commit b6cb0cd into main Jun 15, 2026
5 of 6 checks passed
@scasplte2 scasplte2 deleted the refactor/script-only-api branch June 15, 2026 19:42
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.

2 participants