Skip to content

Conversation

@nishu-builder
Copy link
Contributor

@nishu-builder nishu-builder commented Nov 27, 2025

With this change, you can specify cogames -p with URIs that resolve to MPTs:

uv run cogames play -m hello_world -p s3://softmax-public/policies/daveey.4x4.cvc.dr.maps.1.bct.0_9/:latest
uv run cogames play -m hello_world -p metta://policy/daveey.4x4.cvc.dr_v1_rem.c_8

Copy link
Contributor Author

nishu-builder commented Nov 27, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nishu-builder nishu-builder marked this pull request as ready for review November 27, 2025 20:00
@nishu-builder nishu-builder force-pushed the nishad/mpt-default-uri-scheme branch from ec22952 to 48b30ac Compare November 27, 2025 20:05
@chatgpt-codex-connector
Copy link

💡 Codex Review

try:
resolved = resolve_uri(raw)
if resolved.endswith(".mpt"):
base_spec = policy_spec_from_uri(raw)
return PolicySpecWithProportion(

P1 Badge Handle non-ValueError failures from URI resolution

The new URI path in _parse_policy_spec calls resolve_uri/policy_spec_from_uri, which can raise resolver exceptions that are not ValueError (e.g., botocore.exceptions.NoCredentialsError when -p s3://... is used without AWS credentials). The surrounding try/except only handles ValueError, so those exceptions now bubble out past get_policy_spec’s handler and crash the CLI instead of showing the friendly parse error/help output. Please catch and translate resolver failures here so policy URIs fail gracefully.

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

@nishu-builder nishu-builder force-pushed the nishad/refactor-uri-scheme-logic branch from 50bba0c to 9de85ce Compare November 27, 2025 20:06
@nishu-builder nishu-builder force-pushed the nishad/mpt-default-uri-scheme branch from 48b30ac to c91d7b9 Compare November 27, 2025 20:06
@nishu-builder nishu-builder requested a review from daveey November 27, 2025 20:07
@nishu-builder nishu-builder force-pushed the nishad/mpt-default-uri-scheme branch from c91d7b9 to b1c6cf0 Compare November 27, 2025 20:07
@nishu-builder nishu-builder requested review from relh and removed request for daveey November 27, 2025 20:08
Base automatically changed from nishad/refactor-uri-scheme-logic to main December 1, 2025 17:44
@nishu-builder nishu-builder added this pull request to the merge queue Dec 1, 2025
Merged via the queue into main with commit 58f2010 Dec 1, 2025
22 checks passed
@nishu-builder nishu-builder deleted the nishad/mpt-default-uri-scheme branch December 1, 2025 18:09
zfogg pushed a commit that referenced this pull request Dec 20, 2025
With this change, you can specify `cogames -p` with URIs that resolve to
MPTs:

```
uv run cogames play -m hello_world -p s3://softmax-public/policies/daveey.4x4.cvc.dr.maps.1.bct.0_9/:latest
```

```
uv run cogames play -m hello_world -p metta://policy/daveey.4x4.cvc.dr_v1_rem.c_8
```
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.

3 participants