← Back to issue list

Don't add timestamps when the subprocess already does that

View original Github issue

Metadata

Project
craft-cli
Number
#61
Type
issue
State
open
Author
facundobatista
Labels
—
Created
Updated
Closed
—

Current evaluation

Feature request by maintainer to add a `sub_with_timestamps` flag to emit.open_stream() so craft-cli skips adding its own timestamp when the subprocess already emits them. Still unimplemented; open_stream has no such parameter.

Suggested action: keep open

Reason: Verified unimplemented: `open_stream` at craft_cli/messages.py:707 still reads `open_stream(self, text: str | None = None)` with no timestamp flag, and the file history shows no commit adding one. The design is near-turnkey — `_StreamContextManager` already accepts `use_timestamp` and forwards it via `printer_flags`, so this is a backward-compatible keyword-only arg defaulting to False plus tests. It stays open because the author is the maintainer himself, the emitter subsystem is actively maintained (recent commits 2253735 #444, 0e49c01 #479), and age alone is not grounds for closure. Confidence is capped at 72 because the only comment is the maintainer second-guessing the motivation ('We need to re-think about this' — noting emit.pause already hides duplicate timestamps from users, 'It's probably fine, though'), and the parameter name is hedged as 'something like'.

Evaluated by: mr-cal-bot

Impact: 30 Quick Win: 18 Complexity: 12 Confidence: 72 Actionability: 70

Issue body

We need to add a flag to `emit.open_stream`, something like `sub_with_timestamps` (defaults to `False`), which would mean that the executed stuff will add its own timestamp, so in that case Craft CLI won't add the timestamp to the message This way, if we use emit.open_stream on something that has it's own Craft CLI stuff (or adds timestamps in some way), the outer timestamp will not be present; but if we run whatever (e.g. pip) it will add the timestamps as currently does.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 30
Quick Win: 18
Complexity: 12
Confidence: 72
Actionability: 70
keep open Feature request by maintainer to add a `sub_with_timestamps` flag to emit.open_stream() so craft-cli skips adding its own timestamp when the subprocess already emits them. Still unimplemented; open_stream has no such parameter.
qwen/qwen3.6-35b-a3b
Impact: 10
Quick Win: 8
Complexity: 10
Confidence: 90
Actionability: 90
close resolved Request for `sub_with_timestamps` flag in `open_stream`. Maintainer noted `emit.pause` solves the visual timestamp duplication issue and decided the current behavior is acceptable.
qwen/qwen3.8-27b
Impact: 20
Quick Win: 14
Staleness: 75
Complexity: 30
Confidence: 80
Support Request: 5
close stale Request to add a sub_with_timestamps flag to emit.open_stream so Craft CLI skips its timestamp when the subprocess adds one. Author rethought it in 2022, noting emit.pause already hides duplicate timestamps; log timestamps remain but deemed fine.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 10
Confidence: 90
Support Request: 5
close stale Feature request to add a flag to emit.open_stream to skip timestamps when subprocesses provide them. The proposing maintainer later noted an alternative approach resolves the concern. Issue is inactive and the proposed feature is no longer relevant.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 20
Confidence: 85
Support Request: 10
close stale Proposes adding a sub_with_timestamps flag to emit.open_stream to prevent duplicate timestamps when subprocesses already output them. Author recently noted that emit.pause mitigates the issue, suggesting the feature may no longer be necessary.

Update history

No update history recorded yet.

Related work

  • Related To: craft-cli#194 (confidence 45%)

    Commit 24cf0fb 'feat(emit): make text param in open_stream() optional (#194)' previously extended the same method's signature; shows the maintainer is willing to evolve this API, but it does not implement the requested flag.

Related issues

No related issues found above the similarity threshold.