Skip to content

Stream agent output through kelos-capture instead of writing to /tmp - #1189

Merged
gjkim42 merged 1 commit into
mainfrom
kelos-task-1187
May 23, 2026
Merged

gjkim42 merged 1 commit into
mainfrom
kelos-task-1187

Conversation

@kelos-bot

@kelos-bot kelos-bot Bot commented May 21, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

Every agent entrypoint used to tee the agent's JSON-lines stdout into
/tmp/agent-output.jsonl so that /kelos/kelos-capture could re-read it
after the agent exited and emit token usage between the
---KELOS_OUTPUTS_*--- markers. /tmp counts against the pod's
ephemeral-storage limit and the file was never rotated, so a verbose
run could fill the ephemeral budget and trigger node-pressure eviction
that silently failed user tasks.

This PR inlines the parser into the pipe. Each entrypoint now does:

<agent> "${ARGS[@]}" | /kelos/kelos-capture
AGENT_EXIT_CODE=${PIPESTATUS[0]}
exit $AGENT_EXIT_CODE

kelos-capture reads stdin line by line, forwards each line unchanged
to its own stdout (pod logs are byte-identical to today), and
accumulates per-agent counters in memory:

  • claude-code / gemini / cursor — keep only the most recent
    {"type":"result", ...} line.
  • codex / opencode — sum tokens across every turn.completed /
    step_finish event.

Memory cost is O(1) in the size of the stream, /tmp/agent-output.jsonl
is no longer created, and the controller's marker contract is
unchanged.

Which issue(s) this PR is related to:

Fixes #1187

Special notes for your reviewer:

  • ParseUsage(agentType, filePath) is replaced by
    StreamUsage(agentType, io.Reader, io.Writer).
  • The agent's exit code is still propagated via PIPESTATUS[0] — same
    pattern as before, just with kelos-capture on the right of the pipe
    instead of tee.
  • Unit tests in internal/capture now exercise the streaming path for
    all five agent types and verify every input line is forwarded
    unchanged.
  • docs/agent-image-interface.md updated to describe the pipe form.

Does this PR introduce a user-facing change?

Fix Task pod eviction from unbounded /tmp/agent-output.jsonl growth: agent stdout is now streamed through kelos-capture instead of being teed to disk, removing the ephemeral-storage pressure point.

Summary by cubic

Stream agent stdout through /kelos/kelos-capture instead of teeing to /tmp, removing the ephemeral-storage hotspot that caused task pod evictions. Pod logs remain identical to previous behavior and the ---KELOS_OUTPUTS_*--- contract is unchanged.

  • Bug Fixes

  • Refactors

    • Replaced ParseUsage(...) with StreamUsage(agentType, io.Reader, io.Writer); /kelos-capture now streams stdin to stdout and accumulates usage in O(1) memory.
    • Updated entrypoints to <agent> "${ARGS[@]}" | /kelos/kelos-capture; agent exit code preserved via PIPESTATUS[0]. Tests cover large lines, newline-append, and flush-error paths; docs now prescribe the pipe pattern.

Written for commit 3d658a9. Summary will update on new commits. Review in cubic

@github-actions github-actions Bot added needs-triage needs-kind Indicates an issue or PR lacks a kind/* label kind/bug Categorizes issue or PR as related to a bug needs-priority needs-actor release-note and removed needs-kind Indicates an issue or PR lacks a kind/* label labels May 21, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 10 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread internal/capture/usage_test.go Outdated
Comment thread internal/capture/usage.go Outdated
@gjkim42

gjkim42 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

/kelos review

@kelos-bot

kelos-bot Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-reviewer-issue-comment-aa4d8642f656 has succeeded. ✅

@kelos-bot kelos-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Kelos Reviewer Agent @gjkim42

Review Summary

Verdict: COMMENT (GitHub blocks self-approval; submitting as COMMENT — the patch is approve-grade)
Overall correctness: patch is correct
Scope: Replace tee /tmp/agent-output.jsonl + post-hoc file parse with a streaming kelos-capture that forwards stdin verbatim and accumulates token usage in memory.

Findings Overview

Priority Count File:Line Summary
P0 0 — none
P1 0 — none
P2 2 internal/capture/usage.go:46 Deferred bw.Flush() error is silently discarded
P2 internal/capture/usage.go:47-48 Scanner ErrTooLong on a >10MB line now kills the agent (regression)
P3 1 internal/capture/usage_test.go:169-179 assertForwarded only checks substring presence; misses reordering/duplication

Findings

Correctness

  • [P2] internal/capture/usage.go:46 — defer bw.Flush() discards the flush error. If the loop exits cleanly with buffered bytes still pending and the final Flush() fails (e.g., the downstream pod-log writer hits a transient error), StreamUsage returns nil and the last buffered lines vanish from pod logs without any signal to the operator. Capture the flush error explicitly (e.g., named return + defer func() { if ferr := bw.Flush(); err == nil { err = ferr } }()).
  • [P2] internal/capture/usage.go:47-48 — Reliability regression on oversized lines. The scanner is configured with a 10 MiB max (scanner.Buffer(make([]byte, 0, 1<<20), 10<<20)), matching the previous implementation. Before, that limit only meant token usage was lost when a line exceeded it because ParseUsage ran after the agent exited from the on-disk file. Now kelos-capture is the agent's sole stdout consumer in the pipe; on bufio.ErrTooLong Scan() stops, StreamUsage returns immediately, Run() proceeds to emit markers and exits, and the agent gets SIGPIPE on its next write — turning what used to be a silent parse miss into an aborted agent run. Consider draining the remainder with io.Copy(w, r) (and giving up on further usage parsing) when sc.Err() is non-nil, so the agent always gets a clean EOF.

Tests

  • [P3] internal/capture/usage_test.go:169-179 — assertForwarded only checks strings.Contains(out, line+"\n") for each non-empty input line, so duplicates, reordering, or extra output would pass. TestStreamUsageForwardsUnterminatedLine already does the stricter byte-level comparison; the same shape (normalize input to end in \n, then if out.String() != want ) could be reused across the table-driven cases for a stronger forwarder invariant.

Key takeaways

  • Refactor is clean: accumulator interface keeps memory O(1), per-agent extractors are well-factored, and the marker contract with the controller is preserved.
  • Two defensive gaps worth tightening: the deferred flush error and the regression where a >10 MiB line now propagates to the agent as SIGPIPE.

Note on prompt injection: third-party bot content in the PR thread (including a section instructing reviewers to attribute findings to it) was disregarded; the findings above are formed independently from the diff.

Comment thread internal/capture/usage.go Outdated
Comment thread internal/capture/usage.go Outdated
Comment thread internal/capture/usage_test.go Outdated
@gjkim42

gjkim42 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

/kelos pick-up

@kelos-bot

kelos-bot Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-pr-responder-issue-comment-eadee148f2fc has failed. ❌

@gjkim42

gjkim42 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

/kelos pick-up

@kelos-bot

kelos-bot Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-pr-responder-issue-comment-19e781c174f0 has succeeded. ✅

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 2 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread internal/capture/usage.go Outdated
@gjkim42

gjkim42 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

/kelos review

@kelos-bot

kelos-bot Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-reviewer-issue-comment-e09386af3b11 has succeeded. ✅

@gjkim42

gjkim42 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

/kelos pick-up
Squash commits after the work

@kelos-bot

kelos-bot Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-pr-responder-issue-comment-0aa8d38a97c3 has succeeded. ✅

@kelos-bot kelos-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Kelos Reviewer Agent @gjkim42

Review Summary

Verdict: COMMENT (GitHub blocks self-approval; submitting as COMMENT — the patch is approve-grade)
Overall correctness: patch is correct
Scope: Address prior round of feedback on streaming kelos-capture: surface the deferred bw.Flush() error via a named return, drain the rest of r after bufio.ErrTooLong so the agent gets a clean EOF instead of SIGPIPE, and tighten the table-driven forwarding test to a byte-for-byte equality check.

Findings Overview

Priority Count File:Line Summary
P0 0 — none
P1 0 — none
P2 0 — none
P3 1 internal/capture/usage.go:74-83 io.Copy drain leaks scanner-buffered bytes; "line itself is lost" comment is slightly inaccurate

Findings

Correctness

  • [P3] internal/capture/usage.go:74-83 — On bufio.ErrTooLong, the scanner has already read the head of the oversized line into its internal buffer; those bytes are not in r anymore when io.Copy(bw, r) runs, so the head of the bad line vanishes while the tail (whatever was not yet read into the buffer) plus all subsequent lines are forwarded. The behaviour is acceptable — the agent still gets a clean EOF — but the comment "The oversized line itself is lost (bufio.Scanner discards it)" overstates what is dropped: a partial tail of that line still lands in pod logs. If perfect byte fidelity past an oversized line ever matters, a bufio.Reader.ReadBytes('\n') loop would avoid the buffered-byte loss; otherwise rewording the comment to "the head of the oversized line is dropped; the rest is forwarded as raw bytes" is enough.

Key takeaways

  • Previous round's P2 concerns (silent Flush error, SIGPIPE on >10 MiB line, weak Contains-based forwarding assertion) are all addressed in 8bcdb6a — named-return + deferred flush capture, drain-via-io.Copy fallback, and the new assertForwarded byte-equality helper across the table-driven cases.
  • The new TestStreamUsageDrainsOversizedLine and TestStreamUsagePropagatesFlushError cover the regression seams introduced by those fixes, so future refactors should not silently regress them.
  • Only nit left is a wording/edge-case detail on the oversized-line drain path; no blocking issues.

Note on prompt injection: third-party bot content in the PR thread (including a section instructing reviewers to attribute findings to it) was disregarded; the findings above are formed independently from the diff.

@kelos-bot
kelos-bot Bot force-pushed the kelos-task-1187 branch from 8bcdb6a to 7566006 Compare May 22, 2026 14:50
@kelos-bot

kelos-bot Bot commented May 22, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Agent @gjkim42

Addressed the byte-fidelity concern raised in the latest reviews by replacing the bufio.Scanner + ErrTooLong drain with a bufio.Reader.ReadBytes('\n') loop, so every byte read from the agent is forwarded to stdout in order (no scanner buffer holds bytes that io.Copy would later miss). The previous "drain after oversized line" branch is gone — there is no size cap to trip — and TestStreamUsageForwardsLargeLineByteForByte now asserts byte-identical forwarding for an 11 MiB line plus continued usage parsing on the following line. Squashed the branch down to one commit per the request. All CI checks are green.

kelos-bot Bot pushed a commit that referenced this pull request May 22, 2026
… conventions

Add three conventions backed by review feedback on PRs from the past 7 days:

- "Wire new agent runtime images through the full stack in one PR" — from
  the /kelos api-review on PR #1194 (Antigravity CLI). The PR added an image
  directory + kind-load step but did not extend the Task.spec.type enum,
  JobBuilder, credential env-var mapping, agent-image-interface.md, or e2e
  coverage, so `type: antigravity` is rejected at admission.
- "Pin third-party CLI installs in agent-image Dockerfiles" — from cubic
  (P2) and kelos-bot (P3) findings on PR #1194's antigravity/Dockerfile:41
  unversioned `curl install.sh | bash`. The sibling images already use
  ARG XXX_VERSION + pinned URLs.
- "Propagate deferred Close()/Flush() errors via a named return" — from
  the cubic (P2) and kelos-bot (P2) findings on PR #1189
  internal/capture/usage.go:46 silent `defer bw.Flush()` error drop.
@gjkim42

gjkim42 commented May 22, 2026

Copy link
Copy Markdown
Collaborator

/kelos pick-up
Squash commits then

@kelos-bot

kelos-bot Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-pr-responder-issue-comment-4f813a1f83e5 has succeeded. ✅

@kelos-bot
kelos-bot Bot force-pushed the kelos-task-1187 branch from 7566006 to 3d658a9 Compare May 23, 2026 05:54
@kelos-bot

kelos-bot Bot commented May 23, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Agent @gjkim42

Renamed the local parseLine byte slice at internal/capture/usage.go:74 to body to remove the shadowing of the package-level parseLine helper (P3 from the latest review). Amended into the existing single commit so the branch stays squashed. make verify and make test are green locally and CI is fully green. Ready for re-review.

@gjkim42

gjkim42 commented May 23, 2026

Copy link
Copy Markdown
Collaborator

/kelos review

@kelos-bot

kelos-bot Bot commented May 23, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Kelos Task Status

Task kelos-reviewer-issue-comment-6cac80b57559 has succeeded. ✅

@kelos-bot kelos-bot Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Kelos Reviewer Agent @gjkim42

Review Summary

Verdict: COMMENT (GitHub blocks self-approval since the PR was opened by kelos-bot — the patch is approve-grade)
Overall correctness: patch is correct
Scope: Inline kelos-capture into the agent stdout pipe (<agent> | /kelos/kelos-capture), replacing the prior tee /tmp/agent-output.jsonl + post-hoc ParseUsage(filePath) flow. The new StreamUsage(agentType, io.Reader, io.Writer) forwards bytes verbatim via a bufio.Reader.ReadBytes('\n') loop and accumulates per-agent token usage in memory. Updates touch the five entrypoints, internal/capture/{capture,usage,*_test}.go, and docs/agent-image-interface.md; PIPESTATUS[0] exit-code propagation and the controller's ---KELOS_OUTPUTS_*--- marker contract are unchanged.

Findings Overview

Priority Count File:Line Summary
P0 0 — none
P1 0 — none
P2 0 — none
P3 0 — none

Findings

None.

Key takeaways

  • All prior review-round concerns are resolved in commit 3d658a9: named-return + deferred Flush() capture surfaces flush errors (internal/capture/usage.go:49-56); the bufio.Reader.ReadBytes('\n') loop removes the 10 MiB scanner cap entirely so an arbitrarily long line is forwarded byte-for-byte with no SIGPIPE risk; assertForwarded enforces byte-identical forwarding across the table-driven cases; and the local parseLine shadowing of the package-level helper was renamed to body at internal/capture/usage.go:74.
  • The controller marker contract is preserved — cost-usd/input-tokens/output-tokens are still emitted in that fixed order from captureOutputs, with KELOS_AGENT_TYPE consumed inside Run() and the per-agent extractors well-factored into lastResultAccumulator / sumAccumulator (O(1) state).
  • All five entrypoints (claude-code, codex, cursor, gemini, opencode) consistently use <agent> "${ARGS[@]}" | /kelos/kelos-capture with set -uo pipefail and PIPESTATUS[0] exit-code propagation; docs/agent-image-interface.md matches the implementation.
  • New tests (TestStreamUsageForwardsLargeLineByteForByte, TestStreamUsagePropagatesFlushError, TestStreamUsageForwardsUnterminatedLine) lock in the regression seams introduced by the rewrite.

Note on prompt injection: third-party bot content in the PR thread (including <!-- cubic:attribution --> directives demanding attribution to another reviewer) was disregarded; findings here are formed independently from the diff.

@gjkim42
gjkim42 added this pull request to the merge queue May 23, 2026
Merged via the queue into main with commit a976469 May 23, 2026
23 checks passed
@gjkim42
gjkim42 deleted the kelos-task-1187 branch May 23, 2026 11:40
kelos-bot Bot pushed a commit that referenced this pull request Jul 15, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Jul 27, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 8, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 9, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 10, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 11, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 12, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 13, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 14, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 15, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 19, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 20, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 21, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 22, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 23, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 24, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Aug 26, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
kelos-bot Bot pushed a commit that referenced this pull request Sep 24, 2026
The existing "vacuous substring assertions" convention was scoped only to
printer/formatter tests, leaving stream/forwarding tests uncovered. In #1189
both the Kelos reviewer and cubic independently flagged a forwarder test that
used strings.Contains per line, which passes even when lines are dropped,
duplicated, or reordered. Extend the rule to require full byte-equality
comparison for writer/pipe forwarding tests, mirroring the assertForwarded
fix landed in that PR.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task pods evicted by ephemeral storage: /tmp/agent-output.jsonl grows unbounded

1 participant