Repository navigation
ci: onboard to the CI platform (ci-workflows + standards) - #4
Merged
Merged
Conversation
feat(ci): onboard claude-code-plugins to the CI platform Stand up quality CI by consuming the ci-workflows composite actions and reusable workflows by pinned SHA (08a9343), aggregated behind a local ci-status gateway (D2), plus the standards drop-in configs adopted by copy (byte-identical to the upstream source). Lanes: markdown, typos, gitleaks, editorconfig, shellcheck, actionlint, check-jsonschema (plugin manifests + dependabot + workflows), the four repo hygiene lanes (exec-bit, machine-specific-paths, eol-renormalize, comment-hygiene), and zizmor (advisory). link-check runs as a separate scheduled, advisory reusable-workflow caller. Dependabot (github-actions, 7-day cooldown) keeps the SHA pins and version comments current. shellcheck is included now (not deferred) because the repo already tracks shell hooks and a .shellcheckrc. hook-utils.sh drops its vestigial shebang to match the standards sourced-library convention so the exec-bit lane passes (it is sourced, never executed; mode stays 100644). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> @
kyle-sexton
added a commit
that referenced
this pull request
Jun 24, 2026
…formatter producer (#5) * docs: add hook-telemetry envelope contract (schema_version 1.0) Publish the marketplace-wide hook-telemetry convention: a versioned public-API contract for plugin hooks (producers) to emit structured execution telemetry to a consumer-set sink (HOOK_TELEMETRY_SINK, fire-and-forget, opt-in; unset = no-op). Carries this hook's own duration_ms, outcome, and findings — the per-hook signal CC-native OTEL structurally cannot provide (it reports aggregate total_duration_ms and excludes third-party plugin content). docs/conventions/hook-telemetry/: - README.md: spec — mediator boundary, fire-and-forget, best-effort/lossy guarantee; 7-field common envelope; status enum ok|error|skipped|blocked; hook_event free string; per-hook data + data/<hook>.schema.json discovery keyed on hook; forward-compat (additive-only, ignore unknown keys AND tolerate unknown enum values); deprecation policy; SemVer versioning; schemas are contract-docs (not machine-enforced); adopt-by-copy. - envelope.schema.json: draft 2020-12; required = all 7 common fields; additionalProperties true; status enum (4); duration_ms integer >= 0. - data/markdown-format.schema.json: required [tool, file, findings]. - CHANGELOG.md: schema_version 1.0 initial. - examples/markdown-format.json: worked fixture, consistent with both schemas. Contract authoring only; no runtime code. markdown-formatter is the first implementer (emit lands Phase 2). Verified (Tier-0, all PASS): fixture shape (schema_version/status/hook_event/ duration_ms/data); envelope additionalProperties + 4-value status enum; README forward-compat/deprecation/not-machine-enforced text; all 3 JSON parse. Lint deferred — markdownlint-cli2 absent locally. Co-Authored-By: Claude <[email protected]> * feat(markdown-formatter): emit hook telemetry (schema_version 1.0) First implementer of the hook-telemetry convention. The markdown-format hook now emits one telemetry envelope per run to a consumer-set sink (HOOK_TELEMETRY_SINK), fire-and-forget. Additive and opt-in: sink unset = no-op, with stdout and exit code byte-identical to before. hook-utils.sh: add hook::emit_telemetry <hook_id> <hook_event> <status> <start_epoch> <data_json>. Opt-in guard (sink unset -> return 0) + fail-open (jq absent -> return 0). duration_ms from $EPOCHREALTIME (locale-safe: handles . and , separators, 10# guards octal). timestamp via TZ=UTC printf (true UTC). Envelope built with jq -n (stderr -> /dev/null, never touches fd1). Background dispatch with the sink's stdout AND stderr -> /dev/null so it cannot block CC's stdout read to the 15s hook timeout (the C1 fd1-inheritance blocker) nor leak into additionalContext. markdown-format.sh: capture start before formatting; parse tool_name for data.tool; compute repo-relative data.file (cygpath -lm on Windows Git Bash to reconcile drive-letter vs mount form, plain prefix-strip on Linux/macOS, raw-path fallback); call hook::emit_telemetry LAST on the three post-format paths (markdownlint absent -> skipped; clean -> ok, findings []; residual -> ok, findings = violation lines filtered to the " MD<n>/" pattern). Pre-format exits (ext gate, missing file, kill switch) do not emit. stdin read once (INPUT=$(cat)) and fed to both the file_path and tool_name parses. Tests (TDD): markdown-format.test.sh PASS=41/0 (adds sink-set envelope validity, sink-unset additive-safety, non-zero sink, slow-sink C1 timing, stdout-leak); hook-utils.test.sh PASS=23/0 (sourced-lib unit). Shellcheck clean. Verified Tier-0 end-to-end: schema-valid envelope lands in sink; no fd1 leak; sink-unset produces no envelope with identical stdout; hook returns ~1.4s under a 3s sink (non-blocking). Co-Authored-By: Claude <[email protected]> * feat(markdown-formatter): resolve relative HOOK_TELEMETRY_SINK producer-side Resolve a relative HOOK_TELEMETRY_SINK against the caller's repo root so the sink path is clone-portable and worktree-safe when wired via a tracked settings.json env value (CC injects env literally, no ${VAR} expansion). - hook::emit_telemetry: optional 6th repo_root arg ($CLAUDE_PROJECT_DIR fallback, fail-open skip if neither); absolute paths pass through. - Exec changed from unquoted $SINK to quoted "$sink": the sink is now a single executable path (wrap in a script to pass arguments). - markdown-format.sh passes its file-derived REPO_ROOT at all 3 emit sites (CC #9447: CLAUDE_PROJECT_DIR can be empty in plugin hooks). - Contract README gains "Sink path resolution"; CHANGELOG notes it under 1.0. No schema_version bump - envelope wire-format unchanged. - Tests: stub-script sinks replace command-with-args sinks + 4 resolution cases (hook-utils 27/0, markdown-format 41/0). Co-Authored-By: Claude <[email protected]> * fix(hook-telemetry): relax status to documented open string; tighten contract docs A closed JSON-Schema enum on `status` contradicted the contract's own "consumers MUST tolerate unknown enum values" rule: a validator code-generated from the published schema would reject a future status value (JSON Schema 2020-12 sec 6.1.2). Relax `status` to a documented open string (mirrors `hook_event`), matching OpenTelemetry's open-enum pattern (`error.type`). - envelope.schema.json: drop the closed `status` enum; keep type:string and list the documented values in the description. - README: correct the `additionalProperties: true` claim (it encodes only unknown-keys-tolerated, not never-remove/rename — the rest is review/policy); record a deferred-with-trigger note for per-data versioning (CloudEvents `dataschema` precedent); add a consumer/sink adoption section. - CHANGELOG: 1.0 `status` documented as an open string, not a closed enum. Pre-publish correction — no schema_version bump. Validated against CloudEvents, OpenTelemetry semantic conventions, and JSON Schema 2020-12 (primary sources). Co-Authored-By: Claude <[email protected]> * chore(hook-telemetry): conform to CI platform merged from main (#4) Bring the pre-CI-era telemetry files into conformance with the lanes #4 added: - hook-utils.test.sh: git mode 100644 -> 100755 (it carries a shebang; the exec-bit lane requires shebang scripts be 100755, matching its sibling). - Reword "mis-parse"/"mis-resolve" to plain English in the README sink-path note and two hook-utils.sh comments; the typos lane flags the bare "mis" token. Comment-only; no behavior change. Verified: hook-utils 27/0, markdown-format 41/0, shellcheck clean, typos clean. --------- Co-authored-by: Claude <[email protected]>
This was referenced Jun 29, 2026
This was referenced Jul 10, 2026
This was referenced Jul 11, 2026
kyle-sexton
added a commit
that referenced
this pull request
Jul 12, 2026
Address two more Codex P2 findings plus the analogous coaching case: - codebase-detection case (#2): the eval repo has no real auth-flow module, so grounding would fail or reward inventing sources. Reframe to the routing + graceful-degradation invariant — resolve to codebase mode, discover from live files, and ask the user to point when no grounding exists rather than inventing repo sources. - primary-source case (#5) and coaching case (#4): a fresh topic invocation runs the mission interview before teaching, so expecting immediate content rewarded skipping the mission gate. Make both gate-aware — respect the new-workspace mission flow while asserting the grounding / one-question-coaching invariants.
kyle-sexton
added a commit
that referenced
this pull request
Jul 17, 2026
…opy through standards SSOT Corrector #4 reason-dont-recite (incumbency discipline): inherited content is evidence of what is, never self-justifying authority; a choice supported only by precedent earns first-principles re-derivation, not compliance. A distinct axis from do-your-research (acquire external evidence you lack — this questions internal evidence you inherited). SSOT: the consuming project's incumbency / first-principles rule, degrading to a portable baseline. A standards disagreement it surfaces routes upstream via follow-our-standards (routing only — that skill now owns "never silent deviation, never silent conformance"; no doctrine duplicated). point-dont-copy SSOT correction: its re-anchor step now routes through the org standards' reference-don't-duplicate (in-repo facts: literal/semantic, describe/use/expose roles, stable anchors) and documentation-and-citations (external facts: cite + fetch at read time, no upstream-inventory recap, citation placement) conventions instead of restating that doctrine. The skill keeps only its own pins — threshold two (tighter than the convention's three-or-more smell signal), point-at-public-contracts, no-capability- enumeration — and the not-a-copy carve-outs. Metadata, README, CHANGELOG updated; root catalog regenerated via scripts/generate-catalog.mjs. Corrector #5 (terseness) body authored and held pending its locked name. Co-authored-by: Claude Fable 5 <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This was referenced Jul 17, 2026
kyle-sexton
added a commit
that referenced
this pull request
Jul 19, 2026
…ention Eval #2 expectation #4 framed <type>/<description> as unconditionally acceptable; align it with Step 1 (SKILL.md:56), which treats that form as the fallback default only when the consumer declares no branch convention. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This was referenced Jul 19, 2026
kyle-sexton
added a commit
that referenced
this pull request
Jul 19, 2026
Eval #4 exercised only the briefed-delegable open outcome. The closing invariant names status:needs-info as the other open outcome that must clear status:needs-triage, and its re-entry path differs (attention-view needs-info bucket on reporter reply, not the raw-marker bucket). Add eval #5 to prove an agent clears the raw marker on the needs-info outcome without orphaning the item. Co-Authored-By: Claude Sonnet 5 <[email protected]>
kyle-sexton
added a commit
that referenced
this pull request
Jul 20, 2026
…ard blank stderr Address PR #590 review observations: - #2 (required): emit `Unremovable: 0` before `exit 7` so the apply-path label contract is uniform between the clean success and clean-failure paths. - #3: guard the CLEAN_STDERR echo with `[[ -n ... ]]` so a clean that fails with empty stderr no longer prints a bare newline. - #4: assert RestoredTracked:/Unremovable: labels in the clean-failure test. - #1: one-line comment documenting the deferred mixed locked+unrelated-error fall-through (pre-existing heuristic, not a regression). Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_011V31qpAHP3jfs76B9d5Rfo
2 tasks
This was referenced Aug 9, 2026
Merged
This was referenced Aug 17, 2026
kyle-sexton
added a commit
that referenced
this pull request
Sep 23, 2026
…rection #8 The rewritten Structured Thinking prompt deferred all grouping to Enforce Timeline, which contradicted correction #4 ("Cluster related events together") in the same Chaotic Exploration persona prompt. It now bars only categories decided up front and keeps the whole unsorted. Co-authored-by: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GB2CEA6sdoqgy2Zwb77KAW
This was referenced Sep 28, 2026
Merged
This was referenced Oct 4, 2026
This was referenced Oct 13, 2026
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Oct 19, 2026
…d runs (#8281) Refs: #7901 Hold: a human merges this Broker pin: melodic-software/azure-iac#51 ## Summary A run on an issue now takes its turn cap and job timeout from the issue's Size, Complexity and Uncertainty org issue fields, names the cause when it stops at the cap or on the lane's funding, and the next run resumes from the earlier run's branch instead of starting from main. Lane-power: this changes an unattended budget and unattended re-labeling, and it edits `work-resolve-issue.yml` and `pr-run-activity-write.yml`, so a human merges it. ## Fix - **Issue dimensions.** `models.issue-dimensions` in `docs/conventions/pr-pipeline.yaml` (schema-validated, new `.github/actions/resolve-config/dimensions.mjs`) reads the fields by field id and option id: values over REST `issue-field-values`, the latest setter from the GraphQL field events. A value counts only when its latest setter is a listed human or the lanes App. - Turn cap = the size's `base-turns` × the complexity factor, rounded up; the timeout comes from the size. Sizes: small 75 turns / 50 min, medium 150 / 100, large `split`. Complexity: low 1, medium 1.5, high 2. - New skip reasons, all before any model turn: `not-assessed` (a field is empty or set by an untrusted account), `research-first` / `probe-first` (Uncertainty Knowable / Unknown), `split-required` (Size Large). A trusted setter's option that the config doesn't map fails the resolve (`unmapped-dimension`). GraphQL errors on the event read fail it too. - `work-resolve-issue.yml` pick-slot (now with `issues: read`) resolves the timeout before the run job starts and passes the new `issue-dimensions` pin on, so a field set while the run waits can't outgrow the timeout. No lane reads a `size:` label any more. - **Turn cap.** `limits.turn-cap-restarts` (0-5, default 0; 0 here). A run with no outcome of its own and lane class `max-turns` posts an `outcome=turn-cap` marker naming the cap and the branch. While a restart is left it keeps `agent-ready` and work-unblock restarts it; otherwise it hands back. `pipeline/resolve-issue` reads "Stopped at the turn cap.". - **Funding stop (ci-workflows#781).** A new step copies the failed run's `api_error_status` and capped, token-redacted error text into `lane.json`. A 400 with "regain access on <date>", or a 401, posts an `outcome=funding` marker and keeps `agent-ready`. work-unblock restarts the issue after the (clamped) date; with no date, a person restarts it. Funding stops count toward `limits.limit-stops-per-issue` together with limit stops, so a long outage hands the issue to a person instead of looping. The status reads "Stopped on the lane's funding.". - **Resume.** `--find-prior` resumes when the newest outcome markers are turn-cap, stopped, limited or funding for a run whose lane branch has every commit ahead of main verified, App-authored and web-flow-committed. `issue.json` gains a runner-built `resume`, and `/work-items:work` CI mode continues from it without redoing committed work. - Not built: plan PR 4 (leftover commit, `turn-cap-restarts: 1`). ## Verification - `node --test` over every `.github/actions/*` and `.github/scripts/*` suite on the merged head: 1715 pass, 0 fail. - `scripts/check-app-key-references.test.sh`, `check-read-caller-keys.test.sh`, `plan-test-lanes.test.sh` and the morning-brief suite: all exit 0. runner-policy: passed. - `zizmor --offline` on both workflows: no findings. actionlint reports only `concurrency.queue` at `work-resolve-issue.yml:110`, which main has too. - The GraphQL field-events query was run live against pr-pipeline-sandbox#167 and returned the shape the code reads. - A fresh-context security review (review:security-reviewer) found nothing critical or high. Its medium finding (unbounded funding restarts) and two of its low findings (an untrusted setter's unmapped option failing the resolve; ignored GraphQL errors) are fixed in the last commit. - Known residuals, not fixed: - #4: the field value (REST) and its setter (GraphQL) come from two reads, so a lagging timeline could credit a triager's change to an earlier trusted setter. The most this gains is the config ceiling, 300 turns / 100 min. - #5: the lanes App counts as a trusted setter. No lane writes these fields today, but a future lane that sets them from untrusted text would pass that trust along. - Budgets: owner-approved starting values (2026-10-19); tune in pr-pipeline.yaml from per-run measures. - The dimension tests resolve the live field and option ids against fixture budgets, so a tuning change is a config-only edit. Retuning the live values locally left all suites passing. - No live lane run has happened yet on an issue with these fields set, a capped run, or a funding stop. ## Related - #7901 - melodic-software/ci-workflows#781 (funding stop) - Plan PR 5 (triage sets the issue fields) is the companion PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
5 tasks
This was referenced Nov 4, 2026
This was referenced Nov 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@
Stands up quality CI for
claude-code-plugins, the next consumer in the dedup-program rollout (Phase 6 / greenfield). CI consumes theci-workflowsbuilding blocks by pinned SHA behind a localci-statusgateway, and adopts thestandardsdrop-in configs by copy (byte-identical to upstream).Step 0 resolution (visibility)
The rollout prompt assumed
ci-workflowswas private (which would block a public caller per architecture D6). Live state:ci-workflowsis already public, souses: melodic-software/ci-workflows/...@sharesolves from this public repo — the standard consume-by-reference model works, no architectural change needed. (Follow-ups below reconcile the IaC/doc drift this surfaced.)Lanes (all dogfooded green locally)
markdown,typos,gitleaks,editorconfig,shellcheck,actionlint,check-jsonschema(plugin manifests via schemastore +dependabot.yml+ workflows), the four hygiene lanes (exec-bit,machine-specific-paths,eol-renormalize,comment-hygiene), andzizmor(advisory).link-check.ymlis a separate scheduled, advisory reusable-workflow caller (issues: write, files a rolling tracking issue). Dependabot (github-actions, 7-day cooldown) keeps the SHA pins + version comments current.Deviations from the tracker, driven by live tracked files
shellcheckincluded now (tracker said "later") — the repo already tracks shell hooks and a.shellcheckrc.hook-utils.shdrops its vestigial shebang →# shellcheck shell=bash, matching the standards sourced-library convention, soexec-bitpasses (it is sourced, never executed; mode stays100644). This is a one-line line-1 change, disjoint from the concurrentfeat/hook-telemetry-conventionwork on the same file (which adds a function lower down) — they 3-way merge cleanly.osv-scanneromitted — no dependency lockfiles exist to scan..editorconfig/.gitattributes/.shellcheckrcreplaced with the canonical standards copies.Follow-ups (separate PRs, after this is green)
Program.csstill declaresci-workflowsprivate), enable free public-repo secret scanning + push protection on this repo, and tag itrequires-cito arm the orgci-gate(sequenced so a greenci-statusexists onmainfirst).@