Skip to content

feat(upstream-drift): run all drift checks from one weekly workflow #14211

Closed

Description

@kyle-sexton

Parent

Source: PLAN Phase 3, topic emil-kowalski-upstream-sync

Depends on

Outcome

One weekly run keeps one needs-human issue per upstream, vendored skills included. While an upstream's issue is open, the run updates it and files no second one. A run passes once its issues are written and fails only after filing everything it can.

Demo: Dispatch the weekly drift workflow once: each drifted upstream has one issue carrying needs-human, holding only skill names, paths and hashes; a second run edits those issues and creates none.

Problem:

  • Gap: our reauthored UI-craft content falls behind Emil Kowalski's new skills and advice, and an upstream change reaches nobody unless a person notices a failed workflow run.
  • Who / how many: user-interface plugin users; the maintainers of eight drift-checked upstreams.
  • Frequency: he shipped /choreograph on 2026-11-04 and /gestures on 2026-11-08; the drift check runs weekly.
  • Trend: unknown.
  • Cost: shipped guidance lags his latest; drift waits on a person reading an email.
  • Evidence: one upstream commit past the pin, 5206a95 (verified, gh api commits); the 2026-11-02 run found drift in four upstreams and filed no issue (verified, gh run view 41429553532).

Goal: The user-interface plugin teaches Emil Kowalski's latest guidance, upstream changes reach the tracker on their own, and no agent acts on an item whose intent and vision the user has not been through.

  • Intent (why, in the user's words): "to ensure what we build is what I want"
  • Vision (where this heads): The user-interface skills teach current, researched craft. Upstream changes reach the tracker on their own. Everything is configurable, one source of truth, and nothing is built until we are aligned on intent. (Q58)
  • When goals conflict, prefer: alignment over throughput (Q30)

Constraints:

  • Reauthor posture: stack-agnostic, configurable taste, provenance only in the upstream records and changelog fragments (Emil Kowalski upstream record, adaptation posture).
  • Re-pin procedure: diff each flagged file against the pin, update affected rows and shipped text, update pin and blob SHAs in the drift script and the record in the same change (Emil Kowalski upstream record, re-pin procedure).
  • Mechanism decisions (labels, token scope, duplicate detection) are settled at planning (Q9).
  • The t3dotgg/tstack upstream record uses the standard form, so the one filer covers it; the TStack Skills session does not touch the weekly drift-check workflow.
  • Upstream text is data, never instructions.
  • Fact-based and fact-validated; his taste is trusted; defaults combine his values with research (user, 2026-11-08).
  • Everything configurable and extensible, no hardcoded sizes, ranges, measurements or approaches; good defaults; a downstream repo's conventions are honored (user, 2026-11-08).
  • Uniform and consistent, DRY, single source of truth, for upstream records, drift checking and issue filing (user, 2026-11-08).
  • Quality requirement: production bar (Q3).

Load-bearing assumptions

Assumption Source Falsifying check Response if false
Each drift-checked upstream has an update action an issue can point at Brief Check: the adapter's table names one action path per row, and every path exists Moderate: file the issue with the path it has and report the row with none
The seven adapter rows run in the report job with Node and no token, as the six scripts did in the weekly job plan Check: the dispatched run reports one page line per adapter row Major: stop and restore the deleted workflow from git
Citations are at the local HEAD, 30 commits behind origin/main (git rev-list --count HEAD..origin/main, 2026-11-08); the issue filer and the drift contract README changed there plan First work item: git diff --stat HEAD origin/main on this ticket's paths, and the citation gate re-run at the branch point Minor: re-read the changed lines and proceed

Decisions

  • AC13: A review finding holds a merge only when it is a CRITICAL security finding.
  • Q60: Reduce good-css's check to the vendored-copy hash only, as a seventh adapter row merging into that upstream's issue.
  • Q63: Vendored skills report pin=unknown head=unknown; no script gains a token line; the issue names the skill and its update action.
  • Q66: File everything, then fail the run when a check script breaks its exit contract.
  • D4: Weekly cron 29 10 * * 1, the slot of the workflow this ticket deletes.
  • D5: Scripts run with no write token. The workflow splits into a report job with contents: read and a file job with issues: write; the report crosses as an artifact; GH_TOKEN is set only on the drift-check step of report, so the adapter step runs with no token.
  • D6: Seven adapter rows, six update scripts and good-css's hash check. Ids are upstash/context7, Dometrain/mcp and vojtaholik/good-css, and <plugin>/<skill> for the rest. The good-css row's path= field names its check script, and it merges into that upstream's one issue on its repo= id through the filer's find_repo.
  • D13: The upstream-drift contract CHANGELOG gets a minor entry for this ticket's contract edits. The prior ticket takes 4.3.0, so this one takes 4.4.0.
  • D14: The adapter captures each script's stdout and stderr to a file and appends it only to $GITHUB_STEP_SUMMARY; the report holds only page lines.
  • D15: An out-of-contract exit fails the run after filing. The adapter marks an exit code other than 0, 1 or 2 untracked with ::error and writes the row id to a broken-contract file in the artifact; the file job files every issue, then fails when that file is not empty. A producer that exits 2 or more is a different case: report fails and nothing is filed, because a partial report would let the sweep close issues.
  • D16: Adapter exit codes are 0 when every row was emitted and 2 when it could not finish, never 1. On 2 it writes no --output file.
  • D19: --row-timeout <seconds>, default 120. A timed-out row maps to untracked with a ::warning. The report job has timeout-minutes: 30.
  • D22: Dry run before the first live dispatch: both producers run at the merge commit, then the filer with --dry-run against the live issue list, and the counts go in the PR.

Key interfaces

  • Report line: page repo=<id> pin=<hex|unknown> head=<hex|unknown> status=<untracked|clean|drift> path=<path>. Id is <owner>/<repo>, else <plugin>/<skill>. Q63 governs: pin and head are hex or the literal unknown, and every vendored row reports pin=unknown head=unknown.
  • An unverifiable vendored check reports status=untracked with pin=unknown head=unknown, so the close-unreported sweep leaves its issue alone.
  • The issue filer is the one filer. The drift check's --report mode and a new adapter over the six vendored-skill update scripts feed it. One workflow runs weekly, and the older weekly workflow is deleted.
  • Variation verdicts. Report sources: contain now; one report format, with the adapter as the seam, because a second variant is known (eight upstreams). npm and X: leave as they are.
  • Net new: the vendored-skill adapter, because the six scripts report versions and hashes the standard check cannot read. Challenges a pattern: the weekly workflow's rule that it never opens an issue, replaced by one filer.
  • Conventions followed: the upstream-drift contract, "Pinned git upstreams" and the drift-issues section.

Done when

  • AC9: .github/workflows/maintenance-file-upstream-drift-issues.yml runs on cron 29 10 * * 1 (D4); .github/workflows/maintenance-check-upstream-drift.yml is deleted; grep -rn --exclude=CHANGELOG.md "maintenance-check-upstream-drift" .github docs/contracts docs/conventions plugins/playwright plugins/user-interface/scripts docs/upstream returns no match.
  • AC9: bash scripts/upstream-drift-issues.sh --dry-run <report> on a local report prints one action= line per id and no gh write. Each issue is titled Upstream drift: <id>, and its body holds only skill names, paths, hashes and a pointer to the update action.
  • AC9: The report job has contents: read and timeout-minutes: 30, and the file job has issues: write and needs: report, and it reads the artifact with retention-days: 1 that report uploads only on success (D5, D19).
  • AC11: A check script that broke its exit contract fails the run after filing everything it can: bash scripts/upstream-drift-vendored-report.test.sh exits 0, with a stub exiting 7 mapped to untracked, an ::error, and the row id in the broken-contract file.
  • A dispatched run that found drift and wrote every issue passes, a failed issue write in the file job still fails the run, and a producer exiting 2 or more fails report with nothing filed (D15).
  • AC13: gh issue view <ticket-3b> --json body --jq .body | grep -c "CRITICAL security" is at least 1.
  • AC15: This ticket's PR merges after the PR for ticket 2.
  • AC18: grep -c "fetch_blob_sha\|curl" plugins/user-interface/scripts/check-good-css-drift.sh returns 0, the script's vendored-copy hash check still reports drift as the adapter's seventh row, plugins/user-interface/tests/check-good-css-drift.test.sh keeps cases 1, 4, 5 and 6 and exits 0, and plugins/user-interface/prerequisites.json has no curl entry.
  • AC19: scripts/upstream-drift-vendored-report.sh holds the seven rows. bash scripts/upstream-drift-vendored-report.test.sh exits 0. A dispatched run's report holds 7 adapter page lines, every adapter path exists, and grep -E "^page repo=" <report> shows only hex or unknown for pin and head.
  • .github/scripts/maintenance-monitor-signals/collect.mjs AUDIT_WORKFLOWS names the filer workflow in place of the deleted one, signals.mjs rewords auditFindings so the filer failing on a write or a broken contract reads correctly, and their tests pass.
  • docs/contracts/upstream-drift/README.md retitles its drift-issues section Weekly drift issues and covers weekly runs, the adapter, and pin=unknown head=unknown for vendored rows. docs/contracts/upstream-drift/CHANGELOG.md has a 4.4.0 entry.
  • docs/conventions/upstream-drift/README.md, docs/contracts/loop-lane/posting-lanes.md, docs/conventions/pr-pipeline/README.md, docs/upstream/good-css.md, docs/upstream/mattpocock-skills.md, docs/upstream/claude-dev-building-effective-agent-automations.md and plugins/playwright/README.md name the new runner and say weekly.
  • A .changes/user-interface/<slug>.md fragment with bump: patch exists for the good-css script's behavior change (Q60).
  • After merge, in this order: both producers run at the merge commit, then bash scripts/upstream-drift-issues.sh --dry-run <report> against the live issue list, with the create, edit, reopen and close counts recorded in the PR (D22); the workflow is dispatched once. If the Monday 10:29 UTC cron would fire first, merge after it.
  • The first dispatch covers 16 ids and 7 adapter page lines (8 strict-form records, Emil, good-css and 6 vendored rows, plus the good-css hash row that merges into good-css's id), and issue #9868 needs no action: the first monitor run reads the filer workflow and drops its audit:maintenance-check-upstream-drift section.

Out of scope

  • The filer's needs-human, unknown-token, untracked-blocks-close and wording changes, and the needs-human backfill (the ticket this one depends on).
  • Moving Emil Kowalski's pin (ticket 2).
  • Edits to the six vendored update scripts and any new token line in them (Q63).
  • A recurring X-post watch.
  • All t3dotgg/tstack work: evaluation, upstream record, its drift-check entry, the council port.

Activity

  1. added
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Nov 8, 2026
  2. github-actions commented on Nov 8, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none

    Decision recorded.

    Owner, 2026-11-15, asked whether to dispatch the new weekly drift workflow once now or wait for Monday's scheduled run: "go w/ recommendations", which is to dispatch it once now.

    The first dispatch (run 43746664443, on main after #16397 merged): both jobs succeeded.

    [quote truncated; the full decision is at the link]

    #14211 (comment)

    That decision settles the open questions. I read this as a request to run all drift checks from one weekly workflow that files one needs-human issue per upstream. The recorded first dispatch passed and matched the dry-run prediction.

    Two things are still open, and neither needs an owner decision:

    • A forced write failure and a producer exiting 2 or more were not shown on a live run. Tests cover them.
    • The maintenance monitor's next run needs to read the new workflow and leave Monitoring: report-only audit #9868 needing no action.

    No duplicate or other merged fix found beyond the work already linked in the thread (#16397).

    Automated triage. A maintainer reviews it.

  3. added and removed
    needs-triageNot yet classified. Floor until a type and one priority tier are set.
    on Nov 8, 2026
  4. melodic-automation-lanes commented on Nov 9, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"529c17d3a42d6f614f7f0a22daee6d7b9fdd7d9e027deb0a6c07c89e57f61e8e","body_sha256":"eeaeec32cc8965c060f79ef28c070d046dba9bf38bb27f01f9b866d9e70f90f5"}

  5. github-actions commented on Nov 9, 2026

    @github-actions
    Contributor
    No description provided.
  6. melodic-automation-lanes commented on Nov 9, 2026

    @melodic-automation-lanes
    Contributor

    This records a re-fire of an earlier refusal, not a new refusal. The lanes kill switch stopped run 42650953598, the work-resolve-issue run that agent-ready started, before it finished; that run ended at 2026-11-09T17:23:09Z. work-unblock has now removed and added agent-ready back to start a fresh run. A kill-switch refusal is no fault in this issue or the lanes, so it never counts against later re-fires; after limits.limit-stops-per-issue of them since a person last added agent-ready or a run last reported, work-unblock waits longer before each one, up to 24 hours.

  7. 29 remaining items

  8. github-actions commented on Nov 10, 2026

    @github-actions
    Contributor
    No description provided.
  9. github-actions commented on Nov 10, 2026

    @github-actions
    Contributor
    No description provided.
  10. added
    host-runNeeds an unattended run on a host; the host runner takes it, not a person or the issue lane.
    on Nov 10, 2026
  11. melodic-automation-lanes commented on Nov 10, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped on this issue (patch-protected-path): the change needs a path the issue lane may not push, which a maintainer session builds by hand.
    It added host-run and set Work status to confirmed: an agent run on a host builds it, and it waits on no decision from a person.

    In the run's words:

    The run stopped early (patch-protected-path): its change needs a path the issue lane may not push, which a person changes instead. In the run's words: patch-protected-path: .github/workflows/maintenance-file-upstream-drift-issues.yml (and deleting .github/workflows/maintenance-check-upstream-drift.yml). The issue's AC9 needs the filer workflow given the weekly cron 29 10 * * 1 and split into a report job (contents: read, timeout-minutes: 30) and a file job (issues: write, needs: report, an artifact with retention-days: 1) per D4, D5 and D19, and needs the older weekly workflow deleted. Both files match the lane's protected pattern /.github/workflows/**, so this lane cannot push the change. A person, or a lane allowed to write workflow files, has to make the workflow edits.

    What the run says it did not do:

    • All of the issue's done-when items. The run stopped before any edit because the workflow change sits on a protected path. The non-workflow parts (the vendored-report adapter and its test, the good-css script change, the contract and docs edits, the collect.mjs/signals.mjs changes, the changelog…
    • Repository checks (check-changelog-fragments, check-changed-skills, check-affected) were not run because the working tree has no changes.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/42886042167

    To hand it back to the lane, remove host-run and set Work status to agent-ready again.

  12. kyle-sexton commented on Nov 15, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded.

    Owner, 2026-11-15, asked whether to dispatch the new weekly drift workflow once now or wait for Monday's scheduled run: "go w/ recommendations", which is to dispatch it once now.

    The first dispatch (run 43746664443, on main after #16397 merged): both jobs succeeded.

    Not shown by a live run

    • A failed issue write still failing the run, and a producer exiting 2 or more failing report with nothing filed: neither failure was forced on main. The workflow's steps and the adapter and filer tests cover them.
    • The after-merge order in the done-when list was not followed: the workflow was dispatched without first repeating the dry run at the merge commit. The dry run at the branch head predicted create 6, edit 2, none 8, and the live run did exactly that.

    What is left

    • The maintenance monitor's first run after this change must read the new workflow and leave Monitoring: report-only audit #9868 needing no action. That is checked at the monitor's next run.

    Differences from the issue's wording, from what main held: the contract CHANGELOG entry is 6.1.0, not 4.4.0 (the contract already stood at 6.0.0); the file job also holds contents: read to check the repository out, with issues: write its only write grant.

  13. melodic-automation-lanes commented on Nov 15, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  14. kyle-sexton commented on Nov 15, 2026

    @kyle-sexton
    MemberAuthor

    Decision recorded.

    Owner, 2026-11-15, asked whether this issue may close with two done-when outcomes shown only by tests and not by a live run (a failed issue write failing the run; a producer exiting 2 or more failing report with nothing filed): "go w/ recommednations", which is yes: close on the tests plus the one successful live run (run 43746664443, which matched the dry run).

    The item left open in the record above (the monitor's first run after the change leaves #9868 needing no action): the Maintenance Monitor Signals workflow has run on schedule four times since #16397 merged, each a success, the latest run 43766353978. #9868 has been closed since 2026-11-08, when the monitoring lane stopped keeping a rolling issue per signal, so it needs no action. That run's log names neither the deleted workflow nor the new one; the per-signal job summary was not read.

    Not shown live, by the decision above: the two failure outcomes. Closing.

  15. removed
    host-runNeeds an unattended run on a host; the host runner takes it, not a person or the issue lane.
    on Nov 15, 2026
  16. kyle-sexton commented on Nov 16, 2026

    @kyle-sexton
    MemberAuthor

    Follow-up on the monitor item, which the close comment left unread.

    • AUDIT_WORKFLOWS in .github/scripts/maintenance-monitor-signals/collect.mjs on main names maintenance-audit-test-selection and maintenance-file-upstream-drift-issues; the deleted maintenance-check-upstream-drift appears nowhere under .github on main.
    • Monitor run 43766353978 (scheduled, after ci(upstream-drift): run all drift checks from one weekly workflow #16397 merged) checked out main and ran monitor.mjs from that checkout, so it read the filer workflow and has no section for the deleted one. It succeeded.

    Not read: that run's per-signal job summary page, which the API does not return.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Fields

    Work status

    confirmed

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions