Skip to content

退役键提示:enable.trash 和 versioning 的报错文案仍让作者去用字段级 trackHistory 记录字段历史 #36776

Description

@objectstack-fleet

repo:objectstack#1 · os-warren · session_01JQwxbZeHNsF3RWcWpj7rGj

What is wrong

Two retired-key refusal texts in packages/spec/src/data/object.zod.ts still tell an author to use the per-field trackHistory flag for field-level history:

  • enable.trash guidance: "For history use per-field trackHistory (audit trail), and for retention a lifecycle policy."
  • versioning guidance: "Use per-field Field.trackHistory for field-level history, or a data lifecycle policy (lifecycle) for retention."

That is no longer how field history works on main:

  • Field-change values show by default. enable.fieldHistory is the object's off switch, and a field opts out with its own fieldHistory: false.
  • trackHistory on a field is not the values switch. The field schema itself says trackHistory: false is not an off switch.
  • enable.trackHistory on the object turns on the ledger view and the history verb. It does not decide whether values show.

So an author who hits either refusal is sent to a flag that does not do what the message says.

Where it came from

Flagged by the developer on #36419 (PR #36775, which fixed the same teaching in skills/objectstack-data) and confirmed on main by that PR's contract review. It was correctly left out of that PR's scope.

Done when

  • Both refusal texts point at the current model: field history is on by default; enable.fieldHistory: false turns it off for the object; a field opts out with fieldHistory: false; lifecycle stays the retention answer.
  • No other refusal or .describe() text in packages/spec still sends authors to per-field trackHistory for field-level history.
  • Any test or snapshot that pins those texts is updated.
  • A changeset for @objectstack/spec (wording only, patch).

Activity

  1. added
    documentation
    priority:p2
    pm:queue
    domain:spec
    on Nov 23, 2026
  2. objectstack-fleet commented on Nov 23, 2026

    @objectstack-fleet
    ContributorAuthor

    triage#1 · os-warren · session_01JQwxbZKP5YM48rWMWTS7wE

    Triage: lands in area:build · domain:spec · priority:p2 · Bug · pm:queue · size XS. Area moved from area:data. The filing seat's grade stands. Type set to Bug.
    Rationale: the defect is the prescription in two retired-key refusals (enable.trash, versioning in object.zod.ts), which still send authors to per-field trackHistory for field history. "Wrong metadata is refused at the author's door, with a prescription" is an area:build core feature, so the card lands there even though the subject is field history. Under North Star Priority rule 2, a wrong shipped sentence is a Bug with the reach "builders, often", because AI copies the prescription into what it writes. An Impeded or Cosmetic severity at that reach is p2. The fix is a wording-only patch in packages/spec, as the card says.

  3. objectstack-fleet commented on Nov 27, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim: PM loop round 1
    Session: session_01L9qibyUSf2nKJWW6qBemSU
    Thread session: session_01L9qibybKQ9ZAg8zN9fVBEN
    Account: os-tesla
    Branch: claude/project-thread-9pkexg
    Worktree: objectstack-issue-36776
    Domain: spec
    Area: o3-build (area:build p2, a seat card thread)
    Seat: repo:objectstack#3
    File surface:

    • packages/spec/src/data/object.zod.ts: the enable.trash and versioning guidance strings, plus the TSDoc near :4703 that calls trackHistory "field-level". The TSDoc is in the same file and makes the same false claim. No .describe() text outside these lines changes.
    • packages/spec/src/data/authoring-key-lint.ts: the FIELD_KEY_GUIDANCE.audit / .auditTrail why-strings (:130-131).
    • packages/spec/src/data/object.test.ts and, if a needle pins them, packages/spec/src/data/authoring-key-lint.test.ts.
    • One .changeset/*.md (@objectstack/spec patch, wording only).
      NOT any other file, and nothing under skills/**. Stop on breach and explain in the report.
      Container & model: S, mode:thread, model: default tier — dispatch-gates.mjs --tier: "no path-derived mandate", effort: high, reason: the thread session serves effort high, and the new sentences must match the field-history model on main word for word
      Clause-②: no
      Metadata-protocol: none
      Responsibility: each refusal states the current model. Field-change history is on by default. enable.fieldHistory: false turns it off for the object. A field opts out with fieldHistory: false. lifecycle stays the retention answer. enable.trackHistory is the ledger view and the history verb, not the values switch. The audit / auditTrail field-key refusals stop sending authors to per-field trackHistory for the activity timeline, and send them where the current model does. Each new sentence is pinned (trash, versioning, audit, auditTrail), and an ablation that restores the old text turns its pin red. Re-check: no string literal in packages/spec/src still sends authors to per-field trackHistory for field-level history (done-when 2).
      Thread-read: none
      Premise: holds, measured on origin/main 27ee984 by parsing through source. ObjectCapabilities.safeParse({trash:false}) and ObjectSchema.create({versioning:{enabled:true}}) both still answer with the per-field trackHistory sentence. One more pair, FIELD_KEY_GUIDANCE.audit / .auditTrail in authoring-key-lint.ts:130-131, sends authors to trackHistory. It falls inside done-when 2 and is taken here.
      Serial constraints cleared: none — no open PR touches these files
      Out of scope, report only: skills/objectstack-project/evals/project-process.json:145 (governed skills/**) says "sets trackHistory where field-level history is wanted". The seat files it after this PR.
  4. added
    pm:dispatched
    and removed
    pm:queue
    on Nov 27, 2026
  5. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibybKQ9ZAg8zN9fVBEN
    os-dev-report

    {
      "issue": 36776,
      "status": "done",
      "branch": "claude/project-thread-9pkexg",
      "pr": "https://github.com/objectstack-ai/objectstack/pull/38064",
      "session": "session_01L9qibybKQ9ZAg8zN9fVBEN",
      "premise_still_valid": true,
      "summary": "The enable.trash and versioning tombstones now share one FIELD_HISTORY_PRESCRIPTION sentence in object.zod.ts: field history needs no key, values show on the record activity timeline by default, enable.fieldHistory: false turns them off for the object, a field opts out with its own fieldHistory: false; each keeps its lifecycle retention half. FIELD_KEY_GUIDANCE.audit/.auditTrail (authoring-key-lint.ts) say delete the key, values already show by default, fieldHistory: false is the field's off switch (fieldHistory: true opts a media or structured-JSON field in). activityMilestones TSDoc no longer calls trackHistory field-level. Wording only: nothing newly refused or accepted. Patch changeset, Clause-② no, Metadata-protocol none.",
      "tests": "Premise at 27ee9843 through source: all four refusals named trackHistory. New pins: object.test.ts describe (trash + versioning: default sentence, both off switches, retention half, no trackHistory; resolveFieldHistory cross-check), versioning needle in the 16.0 tombstone table moved to fieldHistory; authoring-key-lint.test.ts describe for audit/auditTrail via FieldSchema.safeParse. Two files at 396a54f9: Tests 248 passed (248). Ablation via ablation-replace.mjs, each site back to its old text, each restore blob == HEAD: trash 2 failed, versioning 3 failed (2 pins + table needle), audit 2 failed, auditTrail 2 failed. spec build exit 0; check:generated exit 0 (14 up to date); typecheck exit 0; spec test Test Files 909 passed (909), Tests 28807 passed | 1 todo.",
      "gates": "dispatch-gates --ran at 396a54f9: 93 derived, 89 run all exit 0, 4 NOT MEASURED (exit 3), 0 unrun. Then built formula/lint/objectql (OS_SKIP_DTS=1) and measured check:doc-formula-expressions exit 0 and check:lean-entry-closure exit 0. Left NOT MEASURED: check-plugin-teardown-shape --self-test (fixture commit out of shallow clone), check:dual-build-cjs-loads (needs full pnpm build). eslint on the 4 changed .ts exit 0. PR CI not yet concluded.",
      "dogfood_battery": "n/a — no ! in the PR title and no (narrowing) arm",
      "mcp_calls": "0 GitHub MCP calls",
      "api_writes": "2 — fleet-write relay pr_create (POST /repos/objectstack-ai/objectstack/pulls + assignees leg, read-back 5933 bytes identical); this os-dev-report comment via post-stamped",
      "open_questions": [],
      "security_findings": "none",
      "out_of_scope_findings": [
        "skills/objectstack-project/evals/project-process.json:145 expected_output still says the agent 'sets `trackHistory` where field-level history is wanted' (governed skills/**; seat files it after this PR)"
      ],
      "deviations": [
        "Push hook check:commit-card-trailers refused the first commit for a `Refs #36776` body line; amended before the first push (unpublished), no override used."
      ]
    }
  6. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Claim amendment (file surface), after L1 REWORK 7231579249 / L2 7231559159 on PR #38064: S1 and S2 are taken in one push, option (a), so Fixes #36776 stands.
    Added to the file surface:

    • packages/spec/src/data/field-key-aliases.ts: the trackChanges and feedTracked rows stop renaming to trackHistory.
    • packages/spec/src/data/field.zod.ts: prose guidance for those two keys beside the existing tracked row (~l.1744).
    • packages/spec/src/data/field.test.ts: pins beside the tracked describe.
      S1 stays inside the original surface: FIELD_HISTORY_PRESCRIPTION carries the default-off exception the audit rows carry, with a pin and the N2 cross-check (resolveFieldHistory({type:'json', fieldHistory:true}) true, {type:'json'} false). The changeset sentence matches. Both keys stay refused, so Clause-② no, Metadata-protocol none and patch level hold.
  7. objectstack-fleet commented on Nov 28, 2026

    @objectstack-fleet
    ContributorAuthor

    repo:objectstack#3 · os-tesla · session_01L9qibyUSf2nKJWW6qBemSU

    Closed-card tidy · 2026-11-28T04:22Z: the card closed when its PR merged; pm:dispatched comes off.

  8. removed
    pm:dispatched
    on Nov 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:builddocumentationdomain:specpriority:p2

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions