Skip to content

refactor(frontend): rename step-contract intake vocabulary to submit/QueuedRequest - #871

Merged
xiaguan merged 1 commit into
mainfrom
refactor/frontend-scheduler-vocabulary
Aug 14, 2026
Merged

refactor(frontend): rename step-contract intake vocabulary to submit/QueuedRequest#871
xiaguan merged 1 commit into
mainfrom
refactor/frontend-scheduler-vocabulary

Conversation

@xiaguan

@xiaguan xiaguan commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

What

Step-contract vocabulary rename, no behavior change:

Before After
Scheduler::intake(ticket) Scheduler::submit(req)
IntakeTicket QueuedRequest (TicketInnerQueuedInner)
StepEmitter::retire_ticket StepEmitter::retire_queued
engine/ticket.rs engine/request_lifecycle.rs
intake_tx / intake (channel) submit_tx / submissions

Why

  • submit is the verb at both ends of the channel (SchedulerHandle::submitScheduler::submit), matching executor-style submit semantics; verdicts stay deferred to step() either way.
  • The pre-admission typestate handle is named by its state: the codebase already called it "queued" everywhere (queued_at, HandleSlot::Queued, the emitter doc's "queued request") — only the type name disagreed.
  • SubmittedRequest was not available: the legacy contract already occupies it (kv.rs type alias), and renaming legacy code scheduled for deletion isn't worth the churn.

Not touched

  • glm52 / kv-store native "intake" vocabulary (different subsystems, not this contract).
  • Legacy contract (EngineHandle path) unchanged.

Verification

  • cargo check --release -p pegainfer-frontend -p pegainfer-qwen3 -p pegainfer-k3 --examples --tests
  • pegainfer-frontend lib: 60 passed (incl. engine contract tests)
  • pegainfer-qwen3 frontend_adapter: 7 passed
  • pegainfer-k3 scheduler: 8 passed
  • pre-commit hooks (fmt, clippy) pass

…QueuedRequest

Scheduler::intake -> Scheduler::submit, IntakeTicket -> QueuedRequest
(TicketInner -> QueuedInner), retire_ticket -> retire_queued, module
ticket.rs -> request_lifecycle.rs. Channel wiring follows the verb:
submit_tx / submissions.

The pre-admission typestate handle is named by its state (queued_at,
HandleSlot::Queued, and the emitter doc already said "queued request");
submission is the verb at both ends of the channel, matching executor-style
submit semantics with verdicts deferred to step().

Not touched: glm52/kv-store native "intake" vocabulary and the legacy
contract's SubmittedRequest alias (kv.rs), which leaves with the legacy
contract.

Verified: cargo check --release (frontend/qwen3/k3, --examples --tests);
frontend lib 60 tests, qwen3 frontend_adapter 7, k3 scheduler 8 pass.

Signed-off-by: xiaguan <751080330@qq.com>
@xiaguan
xiaguan force-pushed the refactor/frontend-scheduler-vocabulary branch from 8f9533a to f381653 Compare August 14, 2026 09:14
@xiaguan

xiaguan commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: f381653281

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

@xiaguan
xiaguan merged commit 26d621b into main Aug 14, 2026
13 checks passed
@xiaguan
xiaguan deleted the refactor/frontend-scheduler-vocabulary branch August 14, 2026 09:33
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