Skip to content

docs(roadmap): add #462 — version --output-format json envelope missing build_date field; ROADMAP #79 line 1380 cites it as exemplary while the field has never existed#3075

Closed
Yeachan-Heo wants to merge 1 commit into
mainfrom
docs/roadmap-462-version-json-missing-build-date
Closed

docs(roadmap): add #462 — version --output-format json envelope missing build_date field; ROADMAP #79 line 1380 cites it as exemplary while the field has never existed#3075
Yeachan-Heo wants to merge 1 commit into
mainfrom
docs/roadmap-462-version-json-missing-build-date

Conversation

@Yeachan-Heo
Copy link
Copy Markdown
Contributor

ROADMAP pinpoint #462claw version --output-format json is missing build_date AND ROADMAP #79 has a 40-day documentation-vs-implementation drift citing it as already-structured

Dogfooded for the 2026-05-24 13:00 Clawhip pinpoint nudge (message 1508092230261539039).

The bug in one image

$ claw version --output-format json
{
  "git_sha": "003b739d",
  "kind": "version",
  "message": "Claw Code\n  Version          0.1.0\n  Git SHA          003b739d\n  Target           x86_64-unknown-linux-gnu\n  Build date       2026-05-04",
  "target": "x86_64-unknown-linux-gnu",
  "version": "0.1.0"
}

Note: Build date 2026-05-04 is in the message prose but NOT a structured envelope field.

Field parity audit

Field shown in message prose Structured envelope field Source constant
Version 0.1.0 version VERSION
Git SHA 003b739d git_sha GIT_SHA
Target x86_64-unknown-linux-gnu target BUILD_TARGET
Build date 2026-05-04 MISSING DEFAULT_DATE exists at main.rs:159-162

Root cause (traced)

rust/crates/rusty-claude-cli/src/main.rs:2629-2637:

fn version_json_value() -> serde_json::Value {
    json!({
        "kind": "version",
        "message": render_version_report(),
        "version": VERSION,
        "git_sha": GIT_SHA,
        "target": BUILD_TARGET,
    })
}

Three of four prose fields re-extracted from compile-time constants; fourth (DEFAULT_DATE) is skipped. One-line fix: add "build_date": DEFAULT_DATE,.

Verification: grep -rnE 'build_date' rust/crates/rusty-claude-cli/{src,tests}/ --include='*.rs' returns zero hits — the field name has never appeared in either source or test code.

ROADMAP self-contradiction (40-day drift)

ROADMAP #79 at line 1380, filed 2026-04-17 to argue init should match version's structure, contrasts:

claw --output-format json version{kind, message, version, git_sha, target, build_date} — structured.

This claim has been wrong since filing. The actual envelope is 5 fields, not 6. The contrast argument for #79 stands (version IS more structured than init), but the specific field list is inaccurate.

Why distinct from existing items

  • 合影 #324 covers the broader binary-provenance freshness problem (compare embedded git_sha vs workspace HEAD, emit stale_binary boolean) across version/status/doctor. Mentions binary_provenance/workspace_head/stale_binary but does NOT itemize the existing-field gap on build_date.
  • MARK #79 cites version as exemplary structured (contrast direction) but never re-verified the cited field set.
  • 没这么简单,看来有阴谋,fork下来研究研究 #83 covers BUILD_DATE leaking into the system prompt as "today's date" (wrong-place-for-build-date problem).

None document the simple fact that version's ONE legitimate place to display build_date doesn't expose it as a structured field.

Why it matters

  1. Bug reports and CI fingerprinting need machine-readable build_date. Today consumers must regex /Build date\s+(\S+)/ against message — same anti-pattern as MARK #79.
  2. Fix is one line. No architectural cost, no breakage risk.
  3. Self-fulfilling documentation drift: 合影 #324 already cites the version envelope as the reference shape for binary-provenance JSON. Each new entry propagating the wrong field list makes the drift harder to detect.
  4. Cross-envelope inconsistency: if version had build_date, 合影 #324's binary_provenance work could cite it as precedent.
  5. Aligns with 火钳流明,合影合影。后厂村发来贺电 #459 / 合影~ #455 / MARK #79 / 合影 #326 — pattern: prose surface emits derived value, JSON envelope discards structure. Per-entry one-line fixes accumulate into a "structured-envelope completeness" doctrine.

Required fix shape

(a) Add "build_date": DEFAULT_DATE, to version_json_value() at main.rs:2636.
(b) Fix ROADMAP #79 line 1380 in the same commit (keep the contrast point, fix the field list).
(c) Add output_format_contract.rs assertion that claw version --output-format json | jq -e '.build_date' returns a non-null string matching /^\d{4}-\d{2}-\d{2}$|^unknown$/.
(d) Optional: cluster build_date into doctor and status envelopes (lays groundwork for #324).
(e) Optional: add a today_date field using chrono::Utc::today() so BUILD_DATE-vs-runtime difference is observable from one envelope (lays groundwork for #83).

Acceptance check

claw version --output-format json | jq -e '.build_date | type == "string"'

Should print true (currently returns null → exit 1).

Method honesty

Pre-grep gate caught two near-misses this tick before filing:

  1. ROADMAP 没这么简单,看来有阴谋,fork下来研究研究 #83 (BUILD_DATE in system prompt) — same root constant, different surface.
  2. ROADMAP MARK #79 line 1380 — documentation-vs-implementation drift refined the writeup from "brand-new envelope pinpoint" into "self-contradiction angle".


[repo owner's gaebal-gajae (clawdbot) 🦞]

…ng build_date structured field; ROADMAP #79 line 1380 cites it as exemplary while the field has never existed (40-day drift)
@code-yeongyu
Copy link
Copy Markdown
Collaborator

Content merged to main via batch commit c881069. Closing PR.

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.

3 participants