Skip to content

Support Workflow pagination and update Wrangler - #13

Open
cnluzhang wants to merge 1 commit into
mainfrom
adapter/workflow-pagination
Open

Support Workflow pagination and update Wrangler#13
cnluzhang wants to merge 1 commit into
mainfrom
adapter/workflow-pagination

Conversation

@cnluzhang

Copy link
Copy Markdown
Contributor

Summary

  • Add Workflow definition --limit / --cursor, page-aware empty output, and recovery hints for invalidated cursors.
  • Pin Wrangler 4.131.0 and update smol-toml to clear dependency advisories.
  • Suppress Wrangler agent-skill installation/update prompts while preserving verbose build output; reject unmapped connect listeners and Workflow fields before bundling.
  • Improve missing-namespace errors, replace the timing-sensitive idle-timeout test with mock timers, and synchronize bilingual docs and agent guidance.

Compatibility

Default Workflow listing sends no pagination parameters and remains compatible with older Control versions. Pagination stays caller-driven; the CLI does not automatically follow cursors or retry requests.

An empty page with continuation now reports:

(no workflows on this page)
Next cursor: <opaque-cursor>

Validation

  • Unit suites: 610 tests passed on Node 22.23.2 and Node 24.20.0.
  • Formatting, ESLint, and typecheck passed.
  • npm audit --audit-level=moderate: 0 vulnerabilities.
  • npm pack --dry-run and diff checks passed.
  • Live integration was not run for this change.

Add pagination and cursor recovery hints.
Pin Wrangler 4.131.0, suppress skills prompts, and reject unmapped fields.
Improve namespace errors, timeout tests, and documentation.

Signed-off-by: Lu Zhang <lu@wdl.dev>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 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-11T00:35:40.894001Z 27dd3fb Manual request
🔒 Security Review Completed 2026-09-11T00:43:28.973283Z 27dd3fb 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.

@cnluzhang

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 27dd3fb700

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

Copilot AI 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.

🟡 Changes recommended

A null script_name remains silently accepted despite the new strict Workflow-field contract.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds Workflow pagination, stricter Wrangler configuration validation, quieter non-interactive bundling, clearer namespace errors, dependency updates, and synchronized documentation.

Changes:

  • Adds Workflow definition pagination and cursor recovery guidance.
  • Rejects unsupported Wrangler fields and suppresses skills prompts.
  • Updates dependencies, tests, and bilingual documentation.
File summaries
File Description
commands/workflows.js Implements definition pagination and cursor hints.
lib/workflows-format.js Formats paginated Workflow results.
lib/wrangler/bindings.js Validates Workflow fields.
lib/wrangler/config.js Rejects connect listeners.
lib/wrangler/command.js Disables Wrangler skills prompts.
lib/wrangler-pack.js Keeps bundling stdin non-interactive.
lib/common.js Adds the missing-namespace error helper.
lib/command.js Updates namespace-validation documentation.
commands/ai.js Uses the namespace error helper.
commands/d1.js Uses the namespace error helper.
commands/delete.js Uses the namespace error helper.
commands/deploy.js Uses the namespace error helper.
commands/r2.js Uses the namespace error helper.
commands/secret.js Uses the namespace error helper.
commands/tail.js Uses the namespace error helper.
commands/workers.js Uses the namespace error helper.
package.json Updates Wrangler and smol-toml.
package-lock.json Locks updated dependencies.
CHANGELOG.md Records user-visible changes.
GUIDE.md Updates the English guide.
GUIDE-zh.md Updates the Chinese guide.
docs/deploy.md Documents deployment behavior.
docs/deploy-zh.md Synchronizes Chinese deployment docs.
docs/workflows.md Documents Workflow pagination and validation.
docs/workflows-zh.md Synchronizes Chinese Workflow docs.
templates/AGENTS.md Updates generated agent guidance.
.claude/skills/wdl-deploy/SKILL.md Updates deployment skill guidance.
tests/unit/cli-command.test.js Covers missing namespace errors.
tests/unit/cli-control-fetch.test.js Uses mock timers for idle timeout.
tests/unit/cli-deploy.test.js Covers validation and non-interactive bundling.
tests/unit/cli-workflows.test.js Covers pagination and contention guidance.
tests/unit/cli-wrangler-bindings.test.js Covers unknown Workflow fields.
tests/unit/cli-wrangler-command.test.js Covers Wrangler environment suppression.
tests/unit/cli-wrangler-config.test.js Covers rejected connect listeners.
Review details
  • Files reviewed: 33/34 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread lib/wrangler/bindings.js
if (!Array.isArray(cfg.workflows)) {
throw new Error(`${configRel}: [[workflows]] must be an array of tables`);
}
const allowedKeys = new Set(["name", "binding", "class_name", "script_name"]);
@cnluzhang

Copy link
Copy Markdown
Contributor Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 27dd3fb700

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

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