Skip to content

Block unsupported sync before durable persistence - #40

Merged
keida merged 2 commits into
mainfrom
codex/unsupported-sync-fail-closed-20260910
Sep 10, 2026
Merged

keida merged 2 commits into
mainfrom
codex/unsupported-sync-fail-closed-20260910

Conversation

@keida

@keida keida commented Sep 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Parse explicit @D-AI sync as a dedicated command, including bare sync.
  • Fail closed before durable task selection or persistence when sync is unsupported.
  • Add parser and configured-runtime zero-write coverage.

Root cause and invariant

Explicit @D-AI input bypassed natural-language classification. Because sync was not a parser command, it fell through to generic intent; bootstrap/route/execute/debug/recover then persisted a task before the Codex adapter reported that no bounded verification operation was configured.

New invariant: unsupported sync returns BLOCKED before any durable task selection, discovery, ownership, bootstrap, generation, pointer, or companion-file write. Bare and project-qualified sync preserve this invariant.

Scope

  • src/entry/command-parser.ts
  • src/runtime/d-ai-runtime.ts
  • tests/entry/command-parser.test.ts
  • tests/integration/unsupported-sync.test.ts

No actual sync implementation, resolver redesign, fuzzy aliases, project files, installed Skill files, or durable-store redesign.

Verification

  • Focused parser/runtime/activation/integration tests: 144/144 PASS
  • Integration suite: 63 PASS, 1 skipped
  • Typecheck: PASS
  • Structural health after commit: PASS
  • git diff --check and added-line privacy scan: PASS (0 secret-like hits)
  • Ordinary-suite limitation: all emitted test-file results were green with no failing assertion, but Vitest did not emit its final summary/exit during process teardown after bounded waits; exact-head GitHub Actions is the independent release gate.

The real Quote Float canonical task and duplicate durable task were untouched. Duplicate cleanup remains a separate destructive decision. No actual sync was implemented.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 10, 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-10T12:31:15.975175Z e5eac53 PR opened
ℹ️ 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: e5eac532ea

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

}
return { kind: "continue", taskIdOrProject: arguments_.join(" ") };
}
if (command === "sync") {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Recognize sync before attached punctuation

When the documented form @D-AI sync,然后核实 ... (or an English form such as @D-AI sync, then ...) enters createCodexActivation, whitespace tokenization makes the command token sync,然后核实 rather than sync, so this equality is false. The request consequently falls through as an intent, and executeIntent may create and persist a durable task—the exact side effect this change is intended to prevent. Treat punctuation as a command boundary before preserving the trailing task text.

AGENTS.md reference: AGENTS.md:L7-L7

Useful? React with 👍 / 👎.

@keida
keida merged commit b5b80bf into main Sep 10, 2026
9 checks passed
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