Skip to content

refactor(harness-ops): share observability SQL path quoting, store default and die - #15625

Merged
melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-15620-43265188109-1
Nov 12, 2026
Merged

melodic-automation-lanes[bot] merged 3 commits into
mainfrom
work-resolve-issue/issue-15620-43265188109-1

Conversation

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor

Closes #15620

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Moved the sql_path helper, the OTEL store default line and die, which hook-latency.sh, item-rollup.sh and session-compare.sh each defined, into one sourced file, otel/otel-sql.sh. Each script now sets OTEL_PROG to its own name and sources the file right after its OTEL_DIR line, before the first die call. The store line is replaced at the same place by store="" and otel_store_to store, so the order of the duckdb and store checks is unchanged. otel_store_to writes the value with printf -v rather than $(...), so a trailing newline in CC_OTEL_STORE survives as it does in the inline line. The store="" declaration follows the jq_to callers' convention: without it, shellcheck reports SC2154 because it cannot see the printf -v assignment. die prints printf '%s: %s\n' "$OTEL_PROG" "$1", so every message stays byte-identical.

Not verified

  • hook-latency.test.sh, item-rollup.test.sh and session-compare.test.sh: the check-affected output does not list them by name, so I can't confirm they ran here; left to the PR's CI
  • ci-status green: a PR CI check, left to the PR's CI
  • tidy: passes 1-4 ran and made no edits; pass 5 (ai-slop) ran only its rubric read, because the lane's Bash cannot run detect.sh, so the deterministic detector was skipped
  • Changes left uncommitted in the working tree, as the lane instructions require; the runner turns them into the commit

Fix

  • plugins/harness-ops/skills/observability/otel/otel-sql.sh: new sourced-only file (mode 100644, # shellcheck shell=bash header) holding die (script name from OTEL_PROG), sql_path verbatim, and otel_store_to <var>
  • plugins/harness-ops/skills/observability/scripts/hook-latency.sh: sets OTEL_PROG and sources otel-sql.sh after OTEL_DIR; drops its own die and sql_path; store line replaced by otel_store_to store
  • plugins/harness-ops/skills/observability/scripts/item-rollup.sh: same change
  • plugins/harness-ops/skills/observability/scripts/session-compare.sh: same change
  • .changes/harness-ops/work-resolve-issue-issue-15620-43265188109-1-e81a9347.md: patch fragment, ### Changed, "Internal restructuring, no behavior change."

Verification

The runner ran each check from the base copy against 1ff53c8:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

  • check-changelog-fragments: all 7 fragments valid
  • check-changed-skills: observability PASS, 0 errors (4 existing size warnings on SKILL.md, not touched)
  • check-affected: first run failed shellcheck SC2154 (store referenced but not assigned) in all three scripts; fixed by declaring store="" before otel_store_to; re-run: 13 passed, 6 skipped, 0 failed
  • fresh-context review subagent read the new file, the three scripts and their three test suites: no confirmed problems; die output, exit codes, the store value for every CC_OTEL_STORE value, check order and usage line ranges are unchanged, and the suites run the scripts in place
  • The lane run: https://github.com/melodic-software/claude-code-plugins/actions/runs/43265188109

Left out: the items under Not verified.

Related

#15620

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review needs no new review of 276695fed7c86e0ae1412ce05c5aca0fa727d747: no file of this pull request changed since the review of 32e45fd.

Security review: PR #15625 (incremental, head 32e45fd)

No security issues found. This review covered only what changed since 1ff53c8a, and it read all of that change.

Scope. One file changed since the last review: plugins/harness-ops/skills/observability/otel/otel-sql.sh. The incremental diff had no patch for it, so I read the file at the head commit. Its contents (24 lines: die, sql_path, otel_store_to) match the version the last review checked. The fix commit's only change is the file mode: the executable bit was removed, so the file is now 100644. That was the fix for the resolved thread on line 1. A file that is only sourced becoming non-executable adds no attack surface, and the callers load it with source, so it keeps working.

Earlier conclusions still hold:

  • sql_path still doubles single quotes (${p//\'/\'\'}), so no new SQL-literal injection path opens.
  • otel_store_to writes only to the hard-coded variable name store at each call site.

Other checks:

  • Trusted paths: the changed file matches none of the trusted-path globs.
  • Trust controls, manifests, standing instructions: the change touches no trust control, merge hold, workflow, token scope, plugin manifest or standing instruction, so none of those checks had anything to judge.
  • Embedded text: the PR context and the settled-thread text contain no instructions aimed at this lane.
  • Blocking only: this lane already reviewed an earlier head, so only CRITICAL and IMPORTANT findings would have been reported. There were none.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on 1ff53c8aa8c2f22de808cff26be6460d7edee323; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

claude-review needs no new review of 276695fed7c86e0ae1412ce05c5aca0fa727d747: no file of this pull request changed since the review of 32e45fd.

Code review: PR #15625, incremental since 1ff53c8a

No findings. The review was blocking only: this lane already reviewed an earlier head.

What changed since the last review: only plugins/harness-ops/skills/observability/otel/otel-sql.sh changed, and the change is its file mode. The incremental diff has no content patch. The full diff now adds the file as new file mode 100644. The file at head matches the content reviewed before:

  • line 1 is # shellcheck shell=bash, with no shebang
  • die, sql_path and otel_store_to are unchanged

The earlier finding is resolved. It said the sourced-only file was added as 100755. It now lands as 100644, which is what issue #15620 ("mode 100644, sourced only") and the PR's Fix section ask for. The settled thread for this finding is marked lines changed since resolution: no, and nothing reopens it.

Not verified here: I could not run the scripts or the test suites (this lane has no shell), so whether they pass is left to CI. Everything else in the PR is unchanged since 1ff53c8a and was reviewed then.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 1 of max 4 on 1ff53c8.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

The pr-unblock lane stopped address-feedback on this pull request: a fix the lane recorded did not reach the branch, so none of its review replies was posted. The lane sets no label: the run ends in a failing pr-unblock/address-feedback status on the head the lane gated.

When a retry on this head can change the outcome, the lane runs one on its own, up to its per-head cap, and edits this comment if it stops again; a run that does not stop clears the status. When no retry can (a review thread the lane does not take or settle, or a failing check after the retries are spent), a person resolves the threads or gets the checks green, then dispatches the workflow below: that run finds the cause gone and clears the status. On a pull request the lanes App opened, the dispatchers start that run once per stop; on any other, a person does. A new commit to the branch starts clean.

To run it again on this head now, dispatch the pr-unblock workflow:

gh workflow run pr-unblock.yml -R melodic-software/claude-code-plugins -f pr-number=15625 -f activity=address-feedback

Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM62vTDA
Lane-Thread: PRRT_kwDOTCGFQM62vcpo
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 2 of max 4 on 32e45fd.

@melodic-automation-lanes

melodic-automation-lanes Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

Unattended merge: native auto-merge leaves this pull request unarmed at head 276695fed7c86e0ae1412ce05c5aca0fa727d747. No person needs to act: a lane clears this reason, and the next scheduled run judges it again.

a pr-unblock lane stopped its head (pr-unblock/address-feedback is failure), which clears when the
  lane runs again

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 3 of max 4 on 32e45fd.

@melodic-automation-lanes melodic-automation-lanes Bot added the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 12, 2026
@kyle-sexton kyle-sexton removed the needs-session A pr-unblock stop a session builder takes: a change the lane cannot make. Not an owner stop. label Nov 12, 2026
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

pr-unblock / address-feedback finished round 4 of max 4 on 276695f.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 276695fed7c86e0ae1412ce05c5aca0fa727d747, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 276695f

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-15625-276695fed7c86e0ae1412ce05c5aca0fa727d747, expires on 2026-12-12.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Merge-Risk: max=LOW demote=false head=276695fed7c86e0ae1412ce05c5aca0fa727d747 rubric=8.4.12 rater=claude-opus-5-5 checker=claude-opus-5-5

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 023236b Nov 12, 2026
71 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-15620-43265188109-1 branch November 12, 2026 20:07
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 023236b8caf6077aef6473fd260b0cb91b5481ca; later checks count it verified from this comment.

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.

Share the observability SQL path quoting, store default and die through one sourced file

1 participant