Skip to content

refactor: add output emitter contract and differential harness#1899

Open
sang-neo03 wants to merge 5 commits into
mainfrom
feat/output-emitter-convergence
Open

refactor: add output emitter contract and differential harness#1899
sang-neo03 wants to merge 5 commits into
mainfrom
feat/output-emitter-convergence

Conversation

@sang-neo03

@sang-neo03 sang-neo03 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

The success-output path (content-safety scan → envelope → jq → format render → write) has no single owner: it is assembled at two envelope points (RuntimeContext.emit, WriteSuccessEnvelope) and re-implemented across several format-routing functions, which have drifted (raw/Meta support, MarkRaw, the jq safety-warning). This PR lands the foundation for converging them — a single leaf Emitter plus a byte-level differential harness — and is deliberately unwired: no production caller is migrated, so CLI output stays byte-for-byte unchanged and later slices can migrate callers with machine-proven equivalence.

Changes

  • Add internal/output/emitter.go: a command-scoped Emitter that composes the existing leaf primitives (ScanForSafety, Envelope/PrintJson, JqFilter/JqFilterRaw, FormatValue, PaginatedFormatter, WriteAlertWarning) behind Success and StreamPage. It captures out/errOut/identity/color/notice at construction, so emission never reads the global notice hook or os.Stdout.
  • EmitOptions parameterizes the observed differences between the legacy emitters (Raw, OK, Meta, Format, JQ, DryRun, Pretty, JQSafetyWarning); internal/output stays a leaf (no client/cmdutil dependency).
  • Add internal/output/emitter_legacy_diff_test.go: a differential harness that drives the real legacy entry points (RuntimeContext.Out/OutRaw/OutPartialFailure/OutFormat/OutFormatRaw, WriteSuccessEnvelope, the pagination formatter) and asserts byte-identical stdout/stderr and typed errors across raw / ok / meta / jq / notice, all formats, content-safety fail-open/fail-closed, and pagination.

Test Plan

  • make unit-test passed
  • go build ./... / go vet ./... clean; golangci-lint 0 issues; go mod tidy no diff
  • emitter differential harness passes byte-for-byte (GOTOOLCHAIN=go1.25.4 go test -race ./internal/output)
  • skipped: local-eval / acceptance-reviewer — this is an unwired refactor with zero production-caller changes; equivalence is proven by the differential harness
  • manual verification: no production caller instantiates the emitter (grep NewEmitter( finds only the definition); the six production output files show an empty diff vs main; go list -deps ./internal/output excludes client/cmdutil

Related Issues

N/A

Summary by CodeRabbit

  • New Features

    • Introduced a unified output emitter to handle JSON envelopes, jq-filtered results, pretty rendering, legacy formatted output, and streamed newline-delimited pagination.
    • Added partial-failure emission and configurable structured notices with color-aware pretty rendering.
  • Bug Fixes

    • Enforced stricter pagination/streaming rules (including rejecting jq usage for streamed pages).
    • Improved jq validation and content-safety warn/block behavior, with correct stderr output and NDJSON fallback when results aren’t lists.
  • Tests

    • Added/expanded oracle parity tests, pagination tests, and golden fixtures to verify exact stdout/stderr and typed error behavior across formats.

@sang-neo03
sang-neo03 requested a review from liangshuo-1 as a code owner July 15, 2026 07:05
@github-actions github-actions Bot added the size/L Large or sensitive change across domains or core paths label Jul 15, 2026
@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Introduces output.Emitter to centralize success, partial-failure, and paginated output across JSON, jq, pretty, formatted, safety, notices, and output validation. Integrates it into runtime, client, API, and service paths with legacy-parity and behavior tests.

Changes

Output emission

Layer / File(s) Summary
Emitter contracts and dispatch
internal/output/emitter.go
Defines emitter configuration and options, wires dependencies, validates output configuration, and dispatches success and partial-failure output by format.
Emission and pagination paths
internal/output/emitter.go
Implements envelope, pretty, formatted, notice-aware, and paginated emission with safety scanning, warnings, jq restrictions, and stable page formats.
Emitter integration
cmd/api/api.go, cmd/service/service.go, internal/client/response.go, internal/output/envelope_success.go, shortcuts/common/runner.go
Routes streaming, response, envelope, and runtime-context output through the centralized emitter.
Legacy parity and error validation
internal/output/emitter_legacy_diff_test.go, internal/output/testdata/*
Compares emitter output and typed errors with legacy paths across formats, safety modes, notices, pagination, pretty rendering, and writer failures.
Command and response validation
cmd/api/api_paginate_test.go, cmd/service/service_paginate_test.go, internal/client/response_test.go, shortcuts/common/*_test.go
Tests pagination behavior, exact response formatting, safety errors, jq validation, and writer-error handling.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested reviewers: liangshuo-1

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 3.23% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding an output emitter plus a differential harness.
Description check ✅ Passed The PR description includes the required Summary, Changes, Test Plan, and Related Issues sections and is mostly complete.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/output-emitter-convergence

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.81818% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.10%. Comparing base (4a56748) to head (b35e599).

Files with missing lines Patch % Lines
internal/output/emitter.go 77.19% 16 Missing and 10 partials ⚠️
shortcuts/common/runner.go 79.31% 10 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1899      +/-   ##
==========================================
+ Coverage   75.02%   75.10%   +0.07%     
==========================================
  Files         894      895       +1     
  Lines       94294    94404     +110     
==========================================
+ Hits        70746    70899     +153     
+ Misses      18137    18095      -42     
+ Partials     5411     5410       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@b35e5998e403b2ea214713351b6d6724f800f9da

🧩 Skill update

npx skills add larksuite/cli#feat/output-emitter-convergence -y -g

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🧹 Nitpick comments (2)
internal/output/emitter.go (2)

203-222: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicate "unknown format → warn & fall back to json" logic; also silently coerces an unsupported option.

The block at Lines 212-215 is identical to StreamPage's block at Lines 130-133 — worth extracting into a shared helper (e.g., resolveFormat(errOut io.Writer, raw string) Format) to avoid drift between the two paths.

Separately, per the coding guideline for **/*.go ("never silently fall back, coerce unsupported values... Return a typed validation error when a requested option cannot be honored"), silently rewriting an unrecognized Format to JSON (rather than a typed validation error) is exactly the pattern the guideline calls out. This appears intentional here for byte-identical legacy parity (per the PR's stated goal) and the emitter isn't wired to any production caller yet, so I'm not blocking on it — but this should be revisited (return a typed error instead of silently falling back) before this path becomes the production code path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/output/emitter.go` around lines 203 - 222, Extract the duplicated
unknown-format warning and JSON fallback used by emitFormatted and StreamPage
into a shared resolveFormat helper, preserving both paths’ current behavior and
warning text. Leave the unsupported-format fallback unchanged for now, but keep
the helper boundary suitable for later replacement with a typed validation
error.

Source: Coding guidelines


224-241: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

New loose-map type + in-place mutation of caller-supplied data.

emitterDataMap is a fresh loose-map type introduced solely to dodge PrintJson's type switch, and m["_notice"] = notice mutates the caller's own map in place — any code retaining a reference to data after this call will see an injected _notice key it never added. As per coding guidelines, **/*.go files should "Parse map[string]interface{} into typed structs at boundaries... Do not introduce new loose-map code."

This appears to replicate pre-existing FormatValue JSON-branch behavior for byte-parity, so I'm not asking for behavior change now — but consider copying into a local map (maps.Clone or manual copy) before injecting _notice, so the emitter never mutates caller-owned data as a side effect.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@internal/output/emitter.go` around lines 224 - 241, Update
Emitter.printLegacyDataJSON to avoid mutating the caller-supplied map when
adding _notice: clone the map into a local copy before injection, while
preserving the existing JSON output and PrintJson behavior. Remove the need for
the emitterDataMap loose-map workaround if the copied data can be passed through
the established typed path.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@internal/output/emitter_legacy_diff_test.go`:
- Around line 434-465: The TestEmitterStreamPageMatchesPaginationLegacyOracle
cases must cover the opts.JQ != "" branch. Add a jq oracle case that supplies a
non-empty JQ expression, then validate the resulting error with errors.As and
assert the ValidationError.Param field directly; do not rely solely on
assertEquivalentError, which only compares ProblemOf.

In `@internal/output/emitter.go`:
- Around line 174-180: Update the Raw no-JQ branch in the emitter’s Success
method to return the error from enc.Encode(env) instead of discarding it, so
output write failures propagate to callers. Add coverage in
TestEmitterPropagatesOutputError for Raw: true with an empty JQ value and a
failing writer.

---

Nitpick comments:
In `@internal/output/emitter.go`:
- Around line 203-222: Extract the duplicated unknown-format warning and JSON
fallback used by emitFormatted and StreamPage into a shared resolveFormat
helper, preserving both paths’ current behavior and warning text. Leave the
unsupported-format fallback unchanged for now, but keep the helper boundary
suitable for later replacement with a typed validation error.
- Around line 224-241: Update Emitter.printLegacyDataJSON to avoid mutating the
caller-supplied map when adding _notice: clone the map into a local copy before
injection, while preserving the existing JSON output and PrintJson behavior.
Remove the need for the emitterDataMap loose-map workaround if the copied data
can be passed through the established typed path.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9964bff4-3fb6-48e0-b7c2-2ebece4a3bba

📥 Commits

Reviewing files that changed from the base of the PR and between 49b4ccc and 84d1f97.

📒 Files selected for processing (2)
  • internal/output/emitter.go
  • internal/output/emitter_legacy_diff_test.go

Comment thread internal/output/emitter_legacy_diff_test.go
Comment thread internal/output/emitter.go
Introduce a leaf Emitter in internal/output that composes the existing
output primitives (content-safety scan, envelope, jq, format rendering,
notice) behind a single command-scoped port. The emitter is unwired: no
production caller is migrated, so CLI output stays byte-for-byte unchanged.

A differential test harness drives the real legacy entry points
(RuntimeContext.Out/OutRaw/OutFormat/..., WriteSuccessEnvelope and the
pagination formatter) and asserts byte-identical stdout/stderr plus typed
errors, locking behavior before later slices migrate callers.
@sang-neo03
sang-neo03 force-pushed the feat/output-emitter-convergence branch from 84d1f97 to 001e2f8 Compare July 15, 2026 07:26
@sang-neo03

Copy link
Copy Markdown
Collaborator Author

Both CodeRabbit findings are addressed in 001e2f8:

  • Critical (raw JSON path in emitter.go): the encoder error is now returned (return enc.Encode(env)) instead of discarded, so Success no longer reports success on a failed write. Locked by a new TestEmitterRawJSONPropagatesWriteError.
  • Minor (StreamPage --jq): added TestEmitterStreamPageRejectsJQ, which asserts the *errs.ValidationError and its --jq param via errors.As.

The only remaining red check is e2e-live, which is failing on upstream HTTP 429 rate-limiting of the shared test account (unrelated to this change, which adds two unwired files and touches no live API path).

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
fd emitter.go internal/output --exec sed -n '1,260p' {}

Length of output: 7680


Confirmed both fixes in the current emitter.go:

  • The raw-JSON envelope path now return enc.Encode(env) instead of discarding the error, so a write failure will surface as an error from Success.
  • StreamPage returns a *errs.ValidationError with --jq when opts.JQ != "", before any pagination state is touched.

Both look correctly implemented and match the description. Kicking off a full review now to check the rest of the diff, including the new test file.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- split Emitter.Success/PartialFailure and drop EmitOptions.OK so a
  missing ok flag can no longer silently emit ok:false
- give StreamPage its own StreamOptions (format + pretty) instead of
  reusing EmitOptions, making "jq needs aggregation" a compile-time fact
- pin the Emitter jq-error contract (returns error, writes no stderr);
  the caller adapter re-emits the legacy stderr line on migration
- add in-package tests driving the real apiPaginate/servicePaginate over
  a mock transport: multi-page aggregation, empty-result fallback,
  MarkRaw handling, and the business-error raw-response red line

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cmd/api/api_paginate_test.go`:
- Around line 36-52: Update the test-client helpers in
cmd/api/api_paginate_test.go lines 36-52 and
cmd/service/service_paginate_test.go lines 36-52 to use cmdutil.TestFactory(t,
config) instead of constructing the client directly, and set
LARKSUITE_CLI_CONFIG_DIR to t.TempDir() in each suite to isolate configuration
state.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ca931a8c-643b-4d7c-ab6a-4e016c330a6e

📥 Commits

Reviewing files that changed from the base of the PR and between 001e2f8 and ac4bdca.

📒 Files selected for processing (4)
  • cmd/api/api_paginate_test.go
  • cmd/service/service_paginate_test.go
  • internal/output/emitter.go
  • internal/output/emitter_legacy_diff_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • internal/output/emitter.go

Comment thread cmd/api/api_paginate_test.go Outdated
Comment on lines +36 to +52
func newAPIPaginateTestClient(t *testing.T, rt http.RoundTripper) *client.APIClient {
t.Helper()
sdk := lark.NewClient("test-app", "test-secret",
lark.WithEnableTokenCache(false),
lark.WithLogLevel(larkcore.LogLevelError),
lark.WithHttpClient(&http.Client{Transport: rt}),
)
return &client.APIClient{
SDK: sdk,
ErrOut: &bytes.Buffer{},
Credential: credential.NewCredentialProvider(nil, nil, &apiPaginateTokenResolver{}, nil),
Config: &core.CliConfig{
AppID: "test-app",
AppSecret: "test-secret",
Brand: core.BrandFeishu,
},
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Use the standard HTTP test harness in both pagination suites.

Both helpers bypass required factory wiring and configuration isolation.

  • cmd/api/api_paginate_test.go#L36-L52: use cmdutil.TestFactory(t, config) and set LARKSUITE_CLI_CONFIG_DIR to t.TempDir().
  • cmd/service/service_paginate_test.go#L36-L52: apply the same factory and configuration-isolation setup.

As per coding guidelines, HTTP-mocked tests must use cmdutil.TestFactory(t, config) and isolate the configuration directory.

📍 Affects 2 files
  • cmd/api/api_paginate_test.go#L36-L52 (this comment)
  • cmd/service/service_paginate_test.go#L36-L52
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cmd/api/api_paginate_test.go` around lines 36 - 52, Update the test-client
helpers in cmd/api/api_paginate_test.go lines 36-52 and
cmd/service/service_paginate_test.go lines 36-52 to use cmdutil.TestFactory(t,
config) instead of constructing the client directly, and set
LARKSUITE_CLI_CONFIG_DIR to t.TempDir() in each suite to isolate configuration
state.

Source: Coding guidelines

Replace the hand-rolled RoundTripper + APIClient construction in the
apiPaginate/servicePaginate tests with cmdutil.TestFactory and its
httpmock.Registry, and isolate LARKSUITE_CLI_CONFIG_DIR to t.TempDir(),
matching the repo's standard HTTP-mocked test convention. Assertions and
coverage (multi-page aggregation, empty-result fallback, MarkRaw, and the
business-error raw-response red line) are unchanged.
Migrate the success-output surfaces onto internal/output's Emitter,
byte-for-byte identical (proven by frozen golden diffs and the real
paginate/HandleResponse tests):

- RuntimeContext.Out/OutRaw/OutFormat/OutFormatRaw/OutPartialFailure now
  build an Emitter and call Success/PartialFailure; emit and outFormat are
  removed. An adapter maps the returned error back to the legacy
  outputErrOnce / jq-error stderr / exit-code behavior.
- WriteSuccessEnvelope degrades to a thin Emitter.Success delegate; its 8
  callers are unchanged.
- apiPaginate/servicePaginate stream pages via Emitter.StreamPage; the
  aggregate and business-error raw-response branches are untouched.
- HandleResponse routes its non-JSON structured-response branch through
  Emitter.Success.

Frozen golden fixtures replace the runtime legacy oracles so the
differential harness cannot go self-referential after migration.
@github-actions github-actions Bot added size/XL Architecture-level or global-impact change and removed size/L Large or sensitive change across domains or core paths labels Jul 18, 2026

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@shortcuts/common/runner.go`:
- Around line 680-692: Update RuntimeContext.handleEmitterError in
shortcuts/common/runner.go:680-692 to record every non-nil emitter error in
outputErr while only printing the error when JqExpr is active. Ensure OutRaw at
shortcuts/common/runner.go:718-724 preserves the returned writer error in
outputErr, and update shortcuts/common/runner_jq_test.go:124-135 to assert that
the writer error is retained rather than discarded.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1cf55f0a-1e99-40a0-b999-7dfcfb8031f4

📥 Commits

Reviewing files that changed from the base of the PR and between 8c88a3c and 4de1852.

📒 Files selected for processing (13)
  • cmd/api/api.go
  • cmd/api/api_paginate_test.go
  • cmd/service/service.go
  • cmd/service/service_paginate_test.go
  • internal/client/response.go
  • internal/client/response_test.go
  • internal/output/emitter_legacy_diff_test.go
  • internal/output/envelope_success.go
  • internal/output/testdata/runtime_context_legacy.golden.json
  • internal/output/testdata/write_success_envelope_legacy.golden.json
  • shortcuts/common/runner.go
  • shortcuts/common/runner_contentsafety_test.go
  • shortcuts/common/runner_jq_test.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmd/api/api_paginate_test.go

Comment on lines +680 to +692
func (ctx *RuntimeContext) handleEmitterError(err error) {
if err == nil {
return
}
var contentSafetyErr *errs.ContentSafetyError
if errors.As(err, &contentSafetyErr) {
ctx.outputErrOnce.Do(func() { ctx.outputErr = err })
return
}
if ctx.JqExpr != "" {
fmt.Fprintf(ctx.IO().ErrOut, "error: %v\n", err)
ctx.outputErrOnce.Do(func() { ctx.outputErr = err })
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Preserve raw-output write failures through RuntimeContext.

Emitter.Success now reports raw encoder failures, but handleEmitterError drops them unless jq is active, allowing truncated stdout with a successful exit.

  • shortcuts/common/runner.go#L680-L692: record every non-nil emitter error; only conditionally print jq errors.
  • shortcuts/common/runner.go#L718-L724: ensure OutRaw leaves the returned writer error in outputErr.
  • shortcuts/common/runner_jq_test.go#L124-L135: invert the test to require the writer error in outputErr.

As per coding guidelines, output paths must never discard writes. <coding_guidelines>

📍 Affects 2 files
  • shortcuts/common/runner.go#L680-L692 (this comment)
  • shortcuts/common/runner.go#L718-L724
  • shortcuts/common/runner_jq_test.go#L124-L135
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@shortcuts/common/runner.go` around lines 680 - 692, Update
RuntimeContext.handleEmitterError in shortcuts/common/runner.go:680-692 to
record every non-nil emitter error in outputErr while only printing the error
when JqExpr is active. Ensure OutRaw at shortcuts/common/runner.go:718-724
preserves the returned writer error in outputErr, and update
shortcuts/common/runner_jq_test.go:124-135 to assert that the writer error is
retained rather than discarded.

Source: Coding guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature size/XL Architecture-level or global-impact change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant