Skip to content

[skip-logmind] chore(notify): port off Python import + idempotent fallback (§8.3) - #140

Merged
thrillmot merged 4 commits into
mainfrom
chore/stabilize-notify-port-off-python
Jun 4, 2026
Merged

[skip-logmind] chore(notify): port off Python import + idempotent fallback (§8.3)#140
thrillmot merged 4 commits into
mainfrom
chore/stabilize-notify-port-off-python

Conversation

@thrillmot

Copy link
Copy Markdown
Collaborator

Per master plan §8.3. Two-deliverables-in-one: port .github/workflows/notify-agent-skills.yml off the now-dead logmind.core.changelog Python module (PR #137 deleted it) AND add idempotency to the fallback-issue job so a flapping API can't accumulate dozens of duplicate issues on thrillmade/agent-skills (the v1.0.0 release wave generated 12 such fallback issues — already closed in parallel).

Changes:

  1. .github/workflows/notify-agent-skills.yml:

    • Stops importing logmind.core.changelog (gone after chore: remove Python source post-cutover (#149) #137 merge).
    • Calls vendored scripts/parse_changelog.py (~120 LOC) that reads docs/changelog-python.md (new path after chore: remove Python source post-cutover (#149) #137) with fallback to top-level CHANGELOG.md for backward compat. Same extract-sections semantics as the old Python module.
    • Adds fallback-issue idempotency: rolling-24h daily-cap via created:>${CUTOFF} issue search + same-skill check (open from-logmind issues with skills/logmind/SKILL.md in:body). If a recent or open fallback for the same skill exists, comment on it rather than opening a new one.
  2. .github/scripts/parse_changelog.py:

    • New file. Docstring calls out the Option-A migration path: add logmind changelog --since <tag> Go subcommand in next release, replace this script + python3 call with single binary invocation.
    • Tested locally against docs/changelog-python.md:
      • --since v0.6.13 --up-to v0.6.14 → 3,535 chars
      • --since "" --up-to v0.5.10 → 58,357 chars (first-release case)
      • --since v0.7.0 --up-to v0.6.0 → 0 chars (caller-ahead edge)

Parallel deliverable — 12 stale fallback issues closed on thrillmade/agent-skills:
#98 #99 #100 #101 #102 #103 #104 #105 #106 #107 #108 #109 (v1.0.0 release wave: rc1 → rc2 → rc3 → v1.0.0).

Verification:

  • yaml.safe_load + actionlint both clean on the edited workflow.
  • Script tested locally with three representative inputs (above).

URGENT: must land before next logmind tag release; without this, the next tag fires notify-agent-skills.yml which then breaks on the missing Python module and re-opens the fallback issue noise pattern.

PR #137 deleted the Python source tree including
`logmind.core.changelog`, and moved top-level `CHANGELOG.md` to
`docs/changelog-python.md`. The `notify-agent-skills.yml` workflow
relied on both — the next tag push would hard-fail.

This change:

1. Vendors `.github/scripts/parse_changelog.py` (~100 LOC, zero
   non-stdlib deps) reproducing only `extract_sections_between` from
   the deleted module. Resolves CHANGELOG file from
   `docs/changelog-python.md` with a fallback to top-level
   `CHANGELOG.md` for older checkouts (re-runs on pre-#137 tags).

2. Updates the workflow to call the vendored script instead of
   importing logmind; drops the `pip install logmind==<TAG>` step
   (and the PyPI-propagation retry dance) since logmind is no longer
   Python. Anthropic SDK install remains — propose_skill_update.py
   still needs it.

3. Updates the CHANGELOG URLs in the PR body, TODO context file, and
   fallback issue body to point at `docs/changelog-python.md`.

4. Adds idempotency to the fallback-issue job. The v1.0.0 release
   wave (rc1 -> rc2 -> rc3 -> v1.0.0) produced 12 stale fallback
   issues on thrillmade/agent-skills. New rules:

   - Same-skill check (any age): if any open from-logmind issue
     references skills/logmind/SKILL.md, append a comment instead
     of opening a new one.
   - Daily-cap (rolling 24h): if any open from-logmind issue with
     the canonical fallback title was opened in the last 24h,
     comment instead of opening.
   - Both checks degrade gracefully -- gh API errors fall through
     to opening a fresh issue rather than swallowing the signal.

Long-term follow-up: replace the vendored script with a
`logmind changelog --since <tag>` Go subcommand (queued).
@thrillmot
thrillmot enabled auto-merge (squash) June 3, 2026 19:20
@vercel

vercel Bot commented Jun 3, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
logmind-site Ignored Ignored Preview Jun 4, 2026 3:40pm

Request Review

@claude

claude Bot commented Jun 3, 2026

Copy link
Copy Markdown

Claude finished @thrillmot's task in 7m 32s —— View job


PR Review: chore(notify) port off Python import + idempotent fallback

  • Load tools
  • Check for prior review SHA (first pass — no prior)
  • Read changed files (parse_changelog.py +181, notify-agent-skills.yml +107/-38)
  • Check skills (critical-issues-only, evidence-based-review, respect-existing-conventions)
  • Analyze for critical issues
  • Post inline findings (1 pre-existing)
  • Emit structured summary

🐛 Clud Bug review

This round: 0 critical · 0 minor · 0 resolved from prior · 0 still open

Found: 0 🔴 / 0 🟡 / 1 🟣

Per-skill scan

  • [critical-issues-only]: scanned both files. 0 new critical findings.
  • [evidence-based-review]: applied to all findings. ✓ all anchored.
  • [respect-existing-conventions]: scanned for pattern fights. 0 findings.

Pre-existing findings

🟣 [critical-issues-only]: _parse_version collapses consecutive RCs of the same X.Y.Z to identical tuples, causing extract_sections_between to return "" when PREV_TAG and TAG are both RCs of the same version (e.g., v1.0.0-rc1v1.0.0-rc2) (.github/scripts/parse_changelog.py:52).

Reasoning

"1.0.0-rc2".split(".") = ["1", "0", "0-rc2"]; int("0-rc2") raises, so both rc1 and rc2 yield (1, 0, -1). The guard if _parse_version(up_to) <= _parse_version(after) fires and returns "". This empties the changelog sent to Claude, likely causing the propose-skill-update job to fail and the fallback-issue job to fire — the probable root cause of the RC-wave noise this PR addresses with idempotency. Ported from the deleted module; not new. Flag for the Go subcommand follow-up.

The rest of the diff is clean: the pip install logmind removal is correct, the vendored script faithfully replicates the old module semantics, the --since/--up-to lstrip("v") handling is correct, and the idempotency checks degrade gracefully on API failures.

Skills referenced: [critical-issues-only, evidence-based-review, respect-existing-conventions]

Comment thread .github/scripts/parse_changelog.py
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

🐛 Clud Bug review

This round: 0 critical · 0 minor · 0 resolved from prior · 0 still open

Found: 0 🔴 / 0 🟡 / 1 🟣

Per-skill scan

  • [critical-issues-only]: scanned both files. 0 new critical findings.
  • [evidence-based-review]: applied to all findings. 0 unanchored claims.
  • [respect-existing-conventions]: scanned for pattern fights. 0 findings.

Pre-existing findings

🟣 [critical-issues-only]: _parse_version collapses consecutive RCs of the same X.Y.Z to identical tuples, producing empty changelog output for RC-to-RC tag pushes (.github/scripts/parse_changelog.py:52).

Reasoning

'1.0.0-rc2'.split('.') = ['1', '0', '0-rc2']; int('0-rc2') raises, so both rc1 and rc2 yield (1, 0, -1). The guard if _parse_version(up_to) <= _parse_version(after) fires and returns ''. This empties the changelog sent to Claude for consecutive RC pushes, likely causing propose-skill-update to fail and fallback-issue to fire — probable root cause of the RC-wave noise this PR patches with idempotency. Ported from the deleted module; not new. Flag for the Go subcommand follow-up.

Skills referenced: [critical-issues-only, evidence-based-review, respect-existing-conventions]

@claude

claude Bot commented Jun 3, 2026

Copy link
Copy Markdown

Claude encountered an error after 4m 27s —— View job


PR Review: chore(notify) port off Python import + idempotent fallback

  • Load tools
  • Check for prior review SHA (fix-push — this sync push is a merge from main, no code changes to reviewed files)
  • Fetch diff + check skills
  • Review parse_changelog.py (1 pre-existing unfixed)
  • Review notify-agent-skills.yml (1 new critical)
  • Check prior thread resolution (PRRT_kwDOQEcCBc6G3f4W — still open, not fixed)
  • Post inline findings
  • Emit structured summary

Comment thread .github/workflows/notify-agent-skills.yml Outdated
Per clud-bug-review on PR #140 — `set -euo pipefail` plus a bare
`gh issue comment` meant a transient API failure on the idempotency
branch would silently drop the signal entirely (no comment, no fresh
issue). Wrap the comment in a conditional that falls through to the
fresh-issue path on failure. Daily-cap (idempotency rule 2) still
bounds duplicate-open churn.

[skip-logmind]
@claude

claude Bot commented Jun 4, 2026

Copy link
Copy Markdown

Claude finished @thrillmot's task in 4m 26s —— View job


PR Review: chore(notify) port off Python import + idempotent fallback

  • Load tools
  • Check for prior review SHA + fetch diff (full diff: 2 files)
  • Check skills (critical-issues-only, evidence-based-review, respect-existing-conventions)
  • Verify fix for gh issue comment critical finding — fixed in commit 219e9c2
  • Check prior threads — both already resolved
  • Emit structured summary

The fix from the prior critical finding is correctly implemented. Commit 219e9c2 wraps gh issue comment in an if … ; then exit 0; fi guard (lines 353–358 of the workflow), which is set -e-safe and falls through to gh issue create on any failure. The warning echo on line 358 preserves signal visibility. Both prior review threads were already resolved.

The pre-existing _parse_version RC-collapse issue at parse_changelog.py:52 remains in the code (deferred to the Go subcommand follow-up per the prior review), with its thread resolved.

No new findings in this pass.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🐛 Clud Bug review

This round: 0 critical · 0 minor · 0 resolved from prior · 0 still open

Found: 0 🔴 / 0 🟡 / 0 🟣

Per-skill scan

  • [critical-issues-only]: scanned both files. Fix for prior critical finding verified; 0 new findings.
  • [evidence-based-review]: applied. All prior findings anchored; no new claims to anchor.
  • [respect-existing-conventions]: scanned for pattern fights. 0 findings.

Skills referenced: [critical-issues-only, evidence-based-review, respect-existing-conventions]

@claude

claude Bot commented Jun 4, 2026

Copy link
Copy Markdown

Claude finished @thrillmot's task in 2m 9s —— View job


PR Review: chore(notify) port off Python import + idempotent fallback

  • Load tools
  • Check prior review SHA + fetch incremental diff (delta since 219e9c2: only dependabot workflow from main-merge, not in PR scope)
  • Check skills (critical-issues-only, evidence-based-review, respect-existing-conventions)
  • Review new changes — no changes to PR files since last reviewed pass
  • Check prior threads — both already resolved in prior pass
  • Emit structured summary

No changes to the two PR files since the prior passing review (commit 219e9c2). The synchronize event was triggered by a merge-from-main that brought in the dependabot auto-merge workflow only. Both prior review threads remain resolved. No new findings.

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

🐛 Clud Bug review

This round: 0 critical · 0 minor · 0 resolved from prior · 0 still open

Found: 0 🔴 / 0 🟡 / 0 🟣

Per-skill scan

  • [critical-issues-only]: scanned delta since prior pass (zero PR-file changes). 0 findings.
  • [evidence-based-review]: not applicable — no new claims this pass.
  • [respect-existing-conventions]: not applicable — no new code changes this pass.

Skills referenced: [critical-issues-only, evidence-based-review, respect-existing-conventions]

@thrillmot
thrillmot merged commit 3ab27c7 into main Jun 4, 2026
12 checks passed
@thrillmot
thrillmot deleted the chore/stabilize-notify-port-off-python branch June 4, 2026 15:43
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.

1 participant