Skip to content

settings 的 step 是同族第五个声明但不执行的值约束键 —— 先要一个「它算不算值约束」的判断 #6199

Closed

Description

@hotlong

在实施 #5932(补 min/max/minLength/maxLength 的执行)时顺带发现,记录下来交 triage。不在 #5932 的完成范围内 —— #5932 的分诊评论按名点死了那四个键,step 是第五个。

事实

packages/spec/src/system/settings-manifest.zod.ts 的 SpecifierSchema 在同一段注释下声明了三个键:

/** `number` / `slider`: numeric bounds and step. */
min: z.number().optional(),
max: z.number().optional(),
step: z.number().optional(),

#5932 落地后,min / max 在写入路径(validatePatch)与 env 路径
(effectiveEnvOverride)都被执行了。同一行注释下的 step 仍然零读取点 ——
packages/services/service-settings/src/ 里没有任何消费者,superRefine 也不校验它
(不像 min/max 至少查了次序、minLength/maxLength 至少查了次序)。

生产侧目前只有一处声明:packages/services/service-settings/src/manifests/ai.manifest.ts:189
的 temperature(min: 0, max: 2, step: 0.1)。

为什么单独一条,而不是 #5932 的续集

因为它先需要一个产品判断,而不是一段实现。step 有两种读法,导向不同的结果:

我倾向第二种(HTML 语义就是这样,而且 temperature: 0.15 对 AI 服务显然是合法值),
但这是规格判断不是实现细节,所以按 #5932 分诊的同一条界线上报而不自行决定。

影响面

相关

Activity

  1. added
    domain:servicesRetired 2026-10-22, alias of domain:server (services surface); in-flight cards keep it until landed
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Aug 7, 2026
  2. os-project-manager commented on Aug 8, 2026

    @os-project-manager
    Collaborator

    Findings sweep (maintainer-authorized one-off, 2026-08-07 — registered on #6015): promoted to the queue, inheriting the #5932 family ruling: step sits under the same "numeric bounds and step" comment as min/max, and the mother ruling's rationale (declared bounds must bind) transfers cleanly — enforce it the same way. Per the inheritance discipline: if the dev's premise check finds step is genuinely a UI-only hint, report back for a re-ruling instead of forcing it. finding → pm:queue.


    Generated by Claude Code

  3. added
    pm:queueReady for the PM dispatch loop
    pm:dispatchedDispatched to a dev agent by /pm-dispatch
    and removed
    findingRecorded observation — held, not dispatchable until the findings triage round grades it
    on Aug 8, 2026
  4. os-project-manager commented on Aug 8, 2026

    @os-project-manager
    Collaborator

    Claim: PM loop round 1 (services seat)
    Session: session_01USNUyHEr7uaU6MoEWXitei
    Branch: claude/issue-6199-settings-step-enforce
    Worktree: objectstack-issue-6199
    Domain: domain:services
    File surface: packages/services/service-settings/src/** (validatePatch value-window family + env path + tests). packages/spec is explicitly out of surface — step is already declared and the error-code table already has the member; any spec-side need stops the dev with needs_decision.
    Serial constraints cleared: same-function predecessor #6201 (Fixes #5932, merged 2026-08-07T10:57Z) is landed; no open PR currently touches service-settings; #5712/#5933 (valueDomain family, same function eventually) are pm:blocked/unclaimed in other lanes — nothing in flight. Zero in-flight claims in this lane.
    Container class: S — mode:subagent, shared container.


    Generated by Claude Code

  5. os-project-manager commented on Aug 8, 2026

    @os-project-manager
    Collaborator

    Review verdict: ACCEPT — PR #6501.

    What shipped: the declared step grid is enforced on both settings doors — validatePatch (write) and effectiveEnvOverride (env), by construction one family (DeclaredBounds/firstRangeViolation), so it cannot become the next one-door constraint. Grid breach emits the existing catalog member invalid_value with constraint: { step, min? }; packages/spec untouched. Anchor = declared min else 0 (the min: 1, step: 2 = odd-numbers argument), relative tolerance 1e-9 with the float traps pinned numerically (0.7 and 1.2 on a 0.1 grid), window judged before grid, TOUCH gate inherited, non-positive step records no grid (report-never-refuse posture). Rejection tests assert the full ADR-0112 envelope including the route-level 400. Reverse verification: 12 red / 5 green exactly as predicted. CI converged green — ESLint and TypeScript Type Check job conclusions both success.

    The promotion's escape hatch did not fire, and the dev strengthened the ruling: step has zero read points in this repo and in objectui, so the "UI-only hint" reading would have the key expressing presentation for a renderer that does not exist — positive evidence for enforce, not just inheritance.

    PM dispositions on the report's open questions:

    1. Language policy — English stays for agent-authored GitHub content (maintainer policy 2026-08-06, recorded in the dispatch protocol). The maintainer's own Chinese PRs are not bound by an instruction issued to agents and do not repeal it; existing content is never retroactively rewritten. No changes to PR fix(service-settings): enforce the declared step grid on the settings write path and the env path (#6199) #6501 or The data-field step (slider) is the settings step's unenforced twin — record-validator.ts reads min/max and never step #6514. The Chinese changeset is fine — changesets are repo files that compile into release notes and follow their predecessor's language.
    2. ai.manifest temperature step: 0.1 — now that the declaration binds, whether it is product-correct is the manifest owner's question; filed as ai.manifest temperature declares step: 0.1 — now that the grid binds (#6199), decide whether the declaration itself is product-correct #6550 for triage (the dev's recommendation B is recorded there). Not this PR's scope, deliberately.

    Out-of-scope finding #6514 (data-field step twin) verified filed with finding and no queue label — correct discipline.

    Proceeding to ready-for-review + merge queue.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

domain:servicesRetired 2026-10-22, alias of domain:server (services surface); in-flight cards keep it until landedpm:dispatchedDispatched to a dev agent by /pm-dispatchpm:queueReady for the PM dispatch loop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions