Skip to content

Codex/local parity#1

Open
aj47 wants to merge 12 commits into
mainfrom
codex/local-parity
Open

Codex/local parity#1
aj47 wants to merge 12 commits into
mainfrom
codex/local-parity

Conversation

@aj47
Copy link
Copy Markdown
Owner

@aj47 aj47 commented Apr 14, 2026

No description provided.

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Apr 14, 2026

🤖 Augment PR Summary

Summary: This PR moves the repo toward Codex/local parity by introducing deterministic agent-loop/runtime plumbing, layered .agents config parsing fixtures, and a unified verification gate.

Changes:

  • Added CI workflow and toolchain pinning, plus ./scripts/install-dev-tools and ./scripts/verify as the canonical repo gate.
  • Introduced dotagents-config for frontmatter parsing and global/workspace layered .agents config+content loading (agents/tasks/skills/memories) with fixture-backed tests.
  • Introduced dotagents-runtime providing deterministic backends, retry/fallback orchestration, tool-adapter registry wiring, and deterministic MCP-bound tool execution (process and JSON-RPC stdio-session), plus eval-manifest execution tests.
  • Refactored dotagents-server into a library with HTTP/SSE contract tests and wired message-turn generation through the deterministic runtime paths (inspect prompts + .agents layering prompts).
  • Enhanced dotagents-core session store to support runtime-provided assistant content and added broader unit test coverage.
  • Updated OpenTUI prompt submission handling and expanded docs (ADR, parity ledger, testing + performance eval strategy) and fixtures (agent-layering + eval manifest).

Technical Notes: The server now uses deterministic backend dispatch based on prompt triggers ("inspect" and ".agents config"), and CI runs the same ./scripts/verify gate as local development.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

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

Review completed. 5 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

let mut request_line = request.to_string();
request_line.push('\n');

let _ = state.stdin.write_all(request_line.as_bytes());
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 14, 2026

Choose a reason for hiding this comment

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

send_stdio_session_jsonrpc_request ignores the write_all (and read_line) results, which can mask I/O failures and potentially block waiting for a response that will never arrive if the child didn’t receive the request. Consider surfacing these errors so failures are deterministic and diagnosable when the stdio-session process closes stdin/stdout early.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.


#[derive(Clone, Debug, PartialEq, Eq)]
pub struct RetryPolicy {
pub max_attempts: usize,
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 14, 2026

Choose a reason for hiding this comment

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

RetryPolicy exposes max_attempts publicly, but execute_with_retry_and_fallback later calls .expect("retry policy guarantees..."), which will panic if a caller constructs RetryPolicy { max_attempts: 0 }. This makes an invalid-but-publicly-constructible value a runtime crash instead of a regular error.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

},
&inspect_tool_registry,
)
.expect("default tool-adapter runtime prompt execution should not fail");
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 14, 2026

Choose a reason for hiding this comment

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

This .expect("default tool-adapter runtime prompt execution should not fail") will panic the server if tool-adapter execution ever returns an error (e.g. once adapters become process/network-backed), instead of returning a 500 like the layering path does. That turns an execution error into a full-process crash on a user prompt.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

let addr = parse_bind_addr(Some("0.0.0.0:4000".into())).unwrap();
assert_eq!(addr, "0.0.0.0:4000".parse().unwrap());
assert_eq!(
server_addr_from_env().unwrap(),
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 14, 2026

Choose a reason for hiding this comment

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

This test assumes DOTAGENTS_BIND is unset; if it’s set in the environment running tests (CI, developer shell), server_addr_from_env() won’t return DEFAULT_BIND_ADDR and the test can fail. Similar environment coupling exists for tests using app() which reads DOTAGENTS_LAYERING_MCP_STDIO_SESSION_COMMAND* for the default prompt executor.

Severity: medium

Other Locations
  • crates/dotagents-server/src/lib.rs:697

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.


let sessions = store.list_sessions().await;
assert_eq!(sessions.len(), 2);
assert_eq!(sessions[0].id, first.id);
Copy link
Copy Markdown

@augmentcode augmentcode Bot Apr 14, 2026

Choose a reason for hiding this comment

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

This assertion relies on a deterministic ordering from list_sessions() which sorts by updated_at; if two sessions end up with identical timestamps, the sort order is unspecified and this test can become flaky. It may be safer for the test to avoid depending on ordering when keys can tie.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

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