Skip to content

feat(core): define task submission readiness projection - #2498

Merged
jackwener merged 1 commit into
apache:mainfrom
liugddx:feat/task-submission-readiness-contract
Aug 8, 2026
Merged

jackwener merged 1 commit into
apache:mainfrom
liugddx:feat/task-submission-readiness-contract

Conversation

@liugddx

@liugddx liugddx commented Aug 8, 2026

Copy link
Copy Markdown
Member

English

Summary

First implementation slice of #2497 under the product roadmap #2469. This PR defines a shared, pure, scope-aware task-submission readiness contract in @maka/core.

It projects current authoritative inputs into:

  • one overall state: ready, repair_required, unavailable, or unknown;
  • ordered Runtime, model-target, workspace, and requested-capability dimensions;
  • stable machine-readable blocker codes;
  • non-localized repair targets for later Desktop and CLI consumers;
  • authority and observation timestamps for each dimension.

Key behavior:

  • model readiness delegates to the existing isConnectionReady authority;
  • optional capabilities participate only when explicitly requested by the task;
  • unrelated degraded capabilities do not block ordinary work;
  • unknown/loading facts stay distinct from confirmed repair failures and do not invent repair actions;
  • historical Health Snapshot observations are deliberately not accepted as inputs, so an old runtime probe cannot become a current send gate.

Refs #2497
Refs #2469

Verification

  • npm --workspace @maka/core run clean — passed
  • npm --workspace @maka/core run build — passed
  • node --test packages/core/dist/__tests__/task-submission-readiness.test.js — 6/6 passed
  • npx biome check on all changed files — passed
  • git diff --check — passed

Scope

This PR does not add persistence, IPC adapters, Desktop/CLI UI, or a new Health Center. Those remain separate reversible slices in #2497.

中文

概要

这是产品路线 #2469 下子任务 #2497 的第一个实现切片。本 PR 在 @maka/core 中定义共享、纯函数、按任务能力范围判断的提交就绪契约。

投影结果包括:

  • ready、repair_required、unavailable、unknown 四种整体状态;
  • 有序的 Runtime、模型目标、工作区和按需能力维度;
  • 稳定的机器可读 blocker code;
  • 供后续 Desktop/CLI 消费的非本地化 repair target;
  • 每个维度的权威来源和观察时间。

关键行为:

  • 模型就绪判断复用现有 isConnectionReady 权威;
  • 可选能力只有在任务明确请求时才参与判断;
  • 无关能力降级不会阻塞普通任务;
  • unknown/loading 与已确认的修复错误分开,未知状态不会虚构修复动作;
  • 契约刻意不接受历史 Health Snapshot 观察,因此旧 runtime probe 不会变成当前发送门禁。

关联 #2497
关联 #2469

验证

  • npm --workspace @maka/core run clean——通过
  • npm --workspace @maka/core run build——通过
  • node --test packages/core/dist/__tests__/task-submission-readiness.test.js——6/6 通过
  • 对全部改动文件运行 npx biome check——通过
  • git diff --check——通过

范围

本 PR 不包含持久化、IPC 适配、Desktop/CLI UI 或新的健康中心;这些将在 #2497 中以独立、可回退的切片继续交付。

@jackwener
jackwener merged commit c7c6948 into apache:main Aug 8, 2026
12 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.

2 participants