Skip to content

Road object model: compose state, capabilities, identity, and verbs - #4

Open
blackboxprogramming wants to merge 9 commits into
mainfrom
work/road-object-model
Open

blackboxprogramming wants to merge 9 commits into
mainfrom
work/road-object-model

Conversation

@blackboxprogramming

@blackboxprogramming blackboxprogramming commented Sep 14, 2026

Copy link
Copy Markdown
Owner

What this adds

  • a working examples/road_objects.road object model built only from RoadC features the interpreter already supports
  • tests for dict-backed objects, tuple identity, set permissions, list history, and function-valued dispatch tables
  • ROAD_OBJECT_MODEL.md describing how Road can define its own object semantics while Python remains an implementation substrate
  • examples/route_actions.road implementing complete Road road-action/0.1 envelopes as plain Road data
  • explicit requires, authority, and provenance fields aligned with the canonical Road contract
  • Route/action tests proving Routes remain identity data rather than implicit permission
  • explicit status permission enforcement in the object-model example and tests

Why

RoadC already supports lists, dicts, sets, tuples, functions, member access, and functions as values. This change composes those primitives into a usable object model and aligns the implementation with the canonical Road -> RoadOS -> Roadies action boundary.

The repo already contains TypeDefinition / TypeField AST nodes and a parser stub. The next compiler/runtime step is to wire documented type Device: syntax into this same runtime model so type syntax becomes sugar over explicit Road data instead of a second incompatible object system.

Scope

The core parser/interpreter behavior is unchanged in this PR. The new tests lock down semantics already supported by the interpreter and define the target contract for the next type/runtime work.

Review follow-up

The earlier P2 review finding is fixed and resolved: status() now enforces the device's status permission and a denied read does not write a history event.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-14T05:16:54.352620Z f0ea796 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70b32d8e8c

ℹ️ 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".

Comment thread examples/road_objects.road
@blackboxprogramming blackboxprogramming self-assigned this Sep 14, 2026

@blackboxprogramming blackboxprogramming left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Requesting a fresh review of the latest Road action-envelope and object-permission changes.

@blackboxprogramming blackboxprogramming left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f0ea7961ab

ℹ️ 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".

# mistaken for an empty permission requirement.

fun action(actor, verb, target, input, requires, source):
return {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the runnable action example parseable

Running python3 roadc.py run examples/route_actions.road fails here with SyntaxError: Unexpected token INDENT at 8:9: the current parser does not accept newline/indent tokens inside a dict literal. The tests mask this because their copy of action places the entire dict on one line, so this newly added example cannot produce either advertised envelope; use supported single-line syntax or add multiline-literal parsing and execute the actual example in a test.

Useful? React with 👍 / 👎.

@blackboxprogramming blackboxprogramming left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@codex review

Fresh pass requested on the latest Road object model and complete road-action/0.1 envelope examples/tests.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: f0ea7961ab

ℹ️ 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".

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