Skip to content

refactor(harness-ops): simplify landscape_ages.py - #15318

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14518-42992454538-1
Nov 11, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14518-42992454538-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14518

Summary

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

Simplified landscape_ages.py without changing its behavior. The marketplace-row loop is now a list comprehension. endpoints_for builds the commits endpoint once, adding an optional path query instead of using two branches. evaluate converts the commit timestamp to a date once instead of twice. main drops an or "" the exit-3 guard already makes unreachable. Outputs, JSON key order, exit codes, printed text, flags and exported names are unchanged. Added a harness-ops patch changelog fragment.

Not verified

  • test_landscape_ages.py and landscape_ages.test.sh not run: this lane cannot run an interpreter, so they are left to the PR's CI
  • ci-status green: a PR CI check, left to the PR's CI
  • tidy passes 4-5 (write-for-humans, ai-slop fix) skipped for the changelog fragment: the issue requires its body verbatim; passes 1-3 ran with no edits

Fix

  • plugins/harness-ops/skills/audit-plugin-landscape/scripts/landscape_ages.py: the build_rows marketplace loop is now a comprehension; endpoints_for builds the commits URL with one optional path query; evaluate computes the commit date once; main drops a redundant or "" fallback.
  • .changes/harness-ops/work-resolve-issue-issue-14518-42992454538-1-3353c401.md: new patch fragment, ### Changed / "Internal simplification, no behavior change."

Verification

The runner ran each check from the base copy against 7863f36:

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

The run reports:

Left out: the items under Not verified.

Related

#14518

Follow-ups

  • Pre-existing (advisory): **Advisory (closing-issue criterion: "Behavior is unchanged: same outputs…")**: the new code is correct, but no test covers the path-less branch of this rewrite. (thread)

Merge-Risk: max=LOW demote=false head=7863f367fe1eae1a4bcce5c5a4f141811d8b85f9 rubric=8.4.2 rater=claude-opus-5-5 checker=claude-opus-5-5

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

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 7863f367fe1eae1a4bcce5c5a4f141811d8b85f9: read 2 of 2 changed file(s); 0 finding(s), 0 as inline comments.

Security review: no security issues found

I read every hunk of both changed files. Neither matches a trusted path, and the diff touches no trust control, workflow, manifest or standing instruction.

  • plugins/harness-ops/skills/audit-plugin-landscape/scripts/landscape_ages.py is a refactor that keeps behavior the same:
    • The build_rows loop becomes a list comprehension, still using the same github_repo(entry.get("source")) call.
    • endpoints_for builds the commits URL with an optional path= query. That query is still escaped with quote(path, safe=''), and the repo value and the contents endpoint encoding have not changed. No new input reaches the gh api endpoints, so the injection surface is the same as before.
    • evaluate converts the timestamp to a date once, and the ValueError handling is unchanged.
    • In main, the dropped or "" cannot be reached anyway: the all("(status 0)" in ...) guard just above it means checked[0]["unknown"] is a non-empty string.
  • .changes/harness-ops/...md is a changelog fragment with no security surface.

The PR context contains no embedded directives. I found no prior findings and no settled threads, and this is the lane's first review of the pull request (not blocking only).

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 7863f367fe1eae1a4bcce5c5a4f141811d8b85f9; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

Copy link
Copy Markdown
Contributor

claude-review reviewed 7863f367fe1eae1a4bcce5c5a4f141811d8b85f9: read 2 of 2 changed file(s); 1 finding(s), 1 as inline comments.

Code review: refactor(harness-ops): simplify landscape_ages.py (#15318)

I read both changed files in full: the changelog fragment and landscape_ages.py. I compared each hunk with the base code, looking for any input where the old and new behavior differ.

  • build_rows: the comprehension gives the same rows, with the same key order and the same sorted iteration, as the old append loop.
  • endpoints_for: the keys are added in the same order as before (repo, commits, then contents when there is a path). Both URL forms come out byte-identical: commits?path=<q>&per_page=1 with a path, commits?per_page=1 without.
  • evaluate: moving .date() inside the try cannot change which exceptions are caught, because .date() does not raise ValueError. last_commit and age_days get the same values as before.
  • main: the guard only lets this code run when every checked row's unknown contains "(status 0)", so checked[0]["unknown"] is always a non-empty string there. Dropping or "" changes nothing.

Closing issue #14518 acceptance criteria

  • Behavior unchanged: met by inspection. Existing tests cover the path endpoints (fixture keys in fixtures/gh-responses.json), age_days/last_commit, and the exit-3 message. The exception is the path-less commits URL, which no test covers (see the inline comment).
  • Diff limited to the listed file plus a fragment: met.
  • Within 400 lines / 15 files: met.
  • ci-status green: CI hasn't run yet, so this is unverified. I ran no tests; the PR's verification list is the author's claim and I haven't checked it.
  • Fragment body ### Changed / "Internal simplification, no behavior change." with bump: patch: met.

Other checks

  • Path-scoped rules: .claude/rules/ruff-pin.md and skill-bodies-state-current-rules.md match this path, but nothing in them applies to this change.
  • No plugin manifests changed.
  • I found no embedded instructions in the PR context.
  • This change adds no spend.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

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

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 7863f36

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-15318-7863f367fe1eae1a4bcce5c5a4f141811d8b85f9, expires on 2026-12-11.

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

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 6bbc03c Nov 11, 2026
83 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14518-42992454538-1 branch November 11, 2026 10:55
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit 6bbc03cb6d6511d9e5599360d3c3fb298891d769; 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.

Simplify the landscape_ages.py harness-ops plugin code

0 participants