Skip to content

Remove dead MarkdownExtractInput.now field #124

@Jurij89

Description

@Jurij89

Summary

MarkdownExtractInput.now is a declared-but-unused field on the markdown extractor's input interface. Tests pass a FIXED_NOW value via this field, but the current extractor code never consumes it — it's pure dead input. Flagged during PR #121 Round 13 Bug 39's caller-audit pass (git log -S provenance-style trace of the markdown-extractor history) and explicitly left for a dedicated cleanup sweep to keep Round 13's scope tight.

Current state

  • Declaration: MarkdownExtractInput.now in packages/cli/src/extraction/markdown-extractor.ts
  • Test usage: Multiple test files pass FIXED_NOW as the now value when calling extractFromMarkdown — primarily extraction-markdown.test.ts, but grep for FIXED_NOW or now: at extractor call sites across the CLI test suite for the full list.
  • Consumer: Zero. The field is never read inside the extractor or any downstream helper. Round 9 Bug 27 moved the <urn:dkg:extraction:uuid> dkg:extractedAt "..."^^xsd:dateTime emission (the only historical consumer of now) out of the extractor and into the daemon's route handler, which uses its own timestamp source. Nothing inside extractFromMarkdown has needed now since that move.

Why the cleanup was deferred from Round 13

PR #121 Round 13's scope was tightly framed around Bugs 37/38/39 (Codex-flagged). Touching MarkdownExtractInput.now would have required:

  1. Removing the field from the MarkdownExtractInput interface declaration
  2. Removing the corresponding JSDoc
  3. Updating every test call site that currently passes now: FIXED_NOW — estimated 5-10 test files based on the Round 13 rename sweep's grep footprint for MarkdownExtractInput consumers
  4. Verifying no hidden consumer via git log -S 'input.now' or similar — a consumer might exist in a non-obvious path (a helper that destructures input and passes now to a downstream function)

That's a 15-20 minute test-surface-area sweep that didn't belong in Round 13's push, where the Bug 39 provenancesourceFileLinkage rename was already touching 5 files and the scope-discipline rule was explicitly "Round 13 = Bugs 37/38/39 only".

Acceptance criteria

  • MarkdownExtractInput.now is removed from the interface declaration.
  • All test files that previously passed now: FIXED_NOW (or any other timestamp) to extractFromMarkdown are updated to omit the field. FIXED_NOW may still exist as a test constant for other uses — grep before removing it globally.
  • No consumer inside packages/cli/src/extraction/ reads input.now post-cleanup. Confirm via grep on the post-rename file set.
  • Full CLI test suite stays green (was 192/192 at PR feat: source-file linkage triples + devnet hardening (chain onto PR #120) #121 tip 7f6aa97).
  • If FIXED_NOW is only referenced via the removed now: field, it can be deleted from test setup files as part of this sweep. If it has other uses, leave it alone.

Scope notes

  • Not blocking anything. This is code-quality cleanup, not a bug fix. Tests pass with the current dead field in place.
  • No spec change needed. The field was never part of any normative MarkdownExtractInput contract — it's purely an internal implementation detail.
  • Verify before removing, don't trust the flag alone. The Round 13 audit observed zero consumers at the time of flagging, but a subsequent commit could have re-introduced a consumer. Re-grep before deleting.

Branch context

Work against v10-rc (or whichever branch supersedes it at the time of fix). File location: packages/cli/src/extraction/markdown-extractor.ts + any test files under packages/cli/test/ that exercise extractFromMarkdown.

Related context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions