Repository navigation
readme fixes - #18
Merged
Merged
readme fixes#18
Conversation
ataibarkai
force-pushed
the
atai/0824/readme
branch
from
August 25, 2023 06:24
bb39fe9 to
899145d
Compare
shaneholloman
pushed a commit
to shaneholloman/copilotkit
that referenced
this pull request
Apr 21, 2026
… SIZE validation - Extend the binary-extension regex to cover .class, .jar, .pyd, .pyc, .node, .bin, .pdb, .zip, .whl — any of which a build tool can drop into a PR and none of which the previous regex caught. - Add set -euo pipefail at the top of the run block. Previously a transient wc failure (file deleted mid-diff) produced an empty SIZE, which then failed [ "$SIZE" -gt ... ] with "integer expression expected" on stderr while the script marched on — silent false-green possible. Now errors fail the job loudly. - Guard the wc -c call with an explicit numeric-regex check on SIZE. A non-numeric or blank result now emits a ::warning:: and skips the file rather than falling into the arithmetic comparison and crashing under set -e (finding CopilotKit#17, CopilotKit#18).
4 tasks
jpr5
added a commit
that referenced
this pull request
Jun 12, 2026
…, dashboard drilldown D4 parity (#5399) ## Summary Bundles two related dashboard/harness lanes that landed together once both reached green: 1. **CF #18 fairness / claim-fair lane** — the 23-commit base (`fix/fleet-claim-fairness` rebased onto its CF7 integration tip `80c5c9402`) carrying claim-spike, cf3/cf4/cf5/cf6/cf7 hardening waves, plus the **CF8 micro-fix** for the round-8 supplemental-merge finding: - **CF8 F3 supplemental-merge freshness guard** (`useLiveStatus.ts`): the cold-load comm-error supplemental fetch runs CONCURRENTLY with the bulk pages, so the bulk copy of an aggregate row can be NEWER than the supplemental snapshot. The previous merge replaced the bulk row unconditionally, regressing `state`/`observed_at` to stale values until the row's next SSE delta (long for slow-cadence aggregates). Added `supplementalRowIsOlder` — when the supplemental row is strictly older the newer bulk row stays INTACT (signal-less) rather than being grafted into a chimera (newer core + stale signal) that the reducer's signal-PRESENCE no-op check would silently swallow. - **Procedure 3 promotions** (bucket-c/d audit over the CF round-8 ledger): one functional fix (escape `workerId` in fleet-health's reclaim list filter — matches the `JSON.stringify` pattern used at orchestrator.ts:3240 for the same field; a `"`-bearing worker_id would otherwise break out of the literal) plus five doc reconciliations on the producer/contract surfaces flagged across slot1/slot2/slot4/slot5 (stale queue-client cross-reference, WarmHealthConfig doc vs `gate.specs` reality, TickResult.reclaimedIndeterminate "Of reclaimed" → "In addition to reclaimed", TickResult.skippedForBacklog poisoned-count contributor, SweepResult.commErrors equation scoping). 2. **Dashboard drilldown D4 parity** — three commits making the dashboard drilldown surface the D4 rung the same way the grid does: - `feat(showcase): add resolveD4Row + CellState.d4 so the drilldown can see the D4 rung` — exposes the D4 row on `CellState`, modeled after `resolveD3Row`. - `fix(showcase): drilldown shows the D4 row, de-crosses the e2e label, and scopes the rollup line honestly` — renders D4 in the drilldown panel, fixes the crossed e2e label, scopes the rollup line to its real source set. - `fix(showcase): unify dimension naming on the legend taxonomy across grid, legacy cells, and legend` — taxonomy cleanup so legend, grid, and legacy cells use one set of labels. ## Verification - Dashboard `npx tsc --noEmit`: clean (only the pre-existing missing-`@/data/*.json` errors that exist on `main`). - Dashboard `vitest run`: 59 files / 1012 tests passing, 1 skipped. - Harness `npx tsc --noEmit`: clean. - Harness `vitest run`: 121/122 files passing; 1 failed = `probe-invoker times out invoker-level even when driver ignores abortSignal` — the NAMED known wall-clock flake (per CF7 integration verification), re-run in isolation: 67/67 PASS. - Rebase of drilldown-parity onto the updated `fix/cf8-m1` tip: ZERO conflicts (the two lanes touch disjoint files). ## Test plan - [ ] CI green on the PR - [ ] Dashboard drilldown shows D4 rung in addition to D3/D5/D6 - [ ] Legend taxonomy reads the same in legend, grid, drilldown - [ ] (post-merge, in showcase) cold-load comm-error overlay still paints; a stale supplemental no longer regresses a freshly-failed aggregate row
zeekay
pushed a commit
to Dream-AI-4444/CopilotKit
that referenced
this pull request
Sep 11, 2026
… SIZE validation - Extend the binary-extension regex to cover .class, .jar, .pyd, .pyc, .node, .bin, .pdb, .zip, .whl — any of which a build tool can drop into a PR and none of which the previous regex caught. - Add set -euo pipefail at the top of the run block. Previously a transient wc failure (file deleted mid-diff) produced an empty SIZE, which then failed [ "$SIZE" -gt ... ] with "integer expression expected" on stderr while the script marched on — silent false-green possible. Now errors fail the job loudly. - Guard the wc -c call with an explicit numeric-regex check on SIZE. A non-numeric or blank result now emits a ::warning:: and skips the file rather than falling into the arithmetic comparison and crashing under set -e (finding CopilotKit#17, CopilotKit#18).
dongphuongman
pushed a commit
to dongphuongman/CopilotKit
that referenced
this pull request
Oct 24, 2026
…to the requested service (CopilotKit#7955) **Decision owner: Mark (CPK-8652 / Showcase prod recovery). Do not merge without his review.** This is a proposal. Nothing was dispatched or deployed. ## Problem CPK-8652 says that staging's harness and harness-workers must not be promoted to prod. But `showcase_promote.yml` cannot promote a demo service without them: - `resolve-promote-targets.sh` always adds every Tier-1 service (dashboard, harness, harness-workers) to the closure. This happens even for `service=showcase-aimock`. The workflow has no input to leave a service out. - `promote-fleet.sh` sent `--digest <ref>` to **every** service in the closure. `bin/railway` accepts a digest for its positional service, and promote-fleet calls it once per service. So a digest override for one service pinned aimock, pocketbase, dashboard, harness and harness-workers to that service's image too. Because of this, prod demos cannot be restored through the promote workflow without breaking CPK-8652. ## Change The first two commits make the change. The review-fix commits after them harden input validation and widen prod verification to the held services; each is described under **Review fix** below. 1. **`fix(showcase)`: the digest override applies only to the requested service.** `resolve-promote-targets.sh` emits `digest_service` (the requested SSOT name). `promote-fleet.sh` sends `--digest` only to that service. All other closure members promote from their own staging running digest, as they do without a digest. If a digest cannot be tied to exactly one service in the plan, promote-fleet stops before it promotes anything. That covers two cases: a multi-service plan without `DIGEST_SERVICE`, and a `DIGEST_SERVICE` that is not in the plan. The old single-service call shape (`DIGEST` with a one-service plan) still works. (Later review fixes put every input through one guard and pass the service after `--`; see below.) 2. **`feat(showcase)`: new optional `hold` input.** It takes a comma-separated list of SSOT keys or dispatch_names, for example `hold=harness,harness-workers`. - The resolver walks the dependencies first. Then it removes each held service from `services_csv`, `closure_csv` and `closure_plan`, so prod keeps that service's current image. - The resolver emits `held_csv` and lists the held services in the step summary under **Held, unchanged**. - The resolver rejects three cases loudly: an unknown name (so a typo cannot promote the service you meant to hold), holding the service the run promotes, and a hold that removes every service from `all`. - `promote-fleet.sh` lists the held set in its summary (`HELD (n): ...`). As a second check, it promotes nothing if a held service is still in the plan. ### Gates are kept, and now cover the held services No gate is skipped or weakened. `verify-staging-precondition`, the per-service `bin/railway` P1–P6 checks, `verify-prod`, `compatibility-refresh`, the prod equivalence re-sweep and the lint-prod pinned-ness gate all still run. What changed in how they are fed and how inputs are checked (details in the **Review fix** sections): - **Prod verification scope (`verify_csv`).** promote-fleet emits `verify_csv` = the succeeded set plus the held set (failed and not-attempted services excluded). `verify-prod`, `compatibility-refresh` and the equivalence re-sweep now read `verify_csv` instead of `succeeded_csv`, so the held services are checked in prod on their current image next to the promoted ones. `succeeded_csv` stays the mutation set. With nothing held, `verify_csv` equals `succeeded_csv`, so a run without `hold` verifies the same set as before. - **`HELD_CSV` validation.** promote-fleet validates the whole `HELD_CSV` value before parsing and refuses the run if a held service is still in the plan. - **Plain service-token validation.** Every service token that reaches `preflight_scope` and the CLI (from `SERVICES_CSV`, `CLOSURE_PLAN`, `HELD_CSV`, `DIGEST_SERVICE`) must be a known SSOT name of `[a-z0-9-]` that does not start with `-`, checked by the shared input guard before `preflight_scope` runs. `preflight_scope` then refuses a held service in the plan, or a digest that cannot be scoped to exactly one planned service. - **Non-empty tier names.** Each `CLOSURE_PLAN` `tier:name` entry must have a non-empty name, checked per entry before the names are joined. - **Step summary.** The resolver summary lists the **Requested service(s)** separately from the **Mutation plan** (the filtered closure this run actually promotes), with held services under **Held, unchanged**. lint-prod still checks every prod service, including the held ones, for an immutable `@sha256:` pin. With `hold=harness,harness-workers`, the prod control plane used by the re-sweep and the compatibility refresh is the current prod harness and workers. ## Red / green (real scripts, committed SSOT `railway-envs.generated.json`, fake Railway CLI shim; no Railway calls) ### RED, `origin/main` 3f73c87 The resolver has no hold, so harness and harness-workers are always in the closure: ``` ### INPUT=langgraph-python HOLD=harness,harness-workers (HEAD 3f73c87) exit=0 services_csv=showcase-langgraph-python closure_csv=aimock,pocketbase,dashboard,harness,harness-workers,showcase-langgraph-python closure_plan=0:aimock,0:pocketbase,1:dashboard,1:harness,1:harness-workers,2:showcase-langgraph-python (no 'held' in step summary) ### INPUT=showcase-aimock HOLD= (HEAD 3f73c87) closure_plan=0:aimock,0:pocketbase,1:dashboard,1:harness,1:harness-workers ``` promote-fleet sends the digest to all six services: ``` FAKE-RAILWAY ARGS: promote aimock --yes --non-interactive --digest ghcr.io/copilotkit/x@sha256:deadbeef FAKE-RAILWAY ARGS: promote dashboard --yes --non-interactive --digest ghcr.io/copilotkit/x@sha256:deadbeef FAKE-RAILWAY ARGS: promote harness --yes --non-interactive --digest ghcr.io/copilotkit/x@sha256:deadbeef FAKE-RAILWAY ARGS: promote harness-workers --yes --non-interactive --digest ghcr.io/copilotkit/x@sha256:deadbeef FAKE-RAILWAY ARGS: promote pocketbase --yes --non-interactive --digest ghcr.io/copilotkit/x@sha256:deadbeef FAKE-RAILWAY ARGS: promote showcase-langgraph-python --yes --non-interactive --digest ghcr.io/copilotkit/x@sha256:deadbeef ``` bats before the fix: 50 ok, 14 not ok. The 14 failures are all new tests: 9 in `resolve-promote-targets.bats` (CopilotKit#18–26) and 5 in `promote-fleet.bats` (CopilotKit#60–64). ### GREEN, this branch, same invocations ``` ### INPUT=langgraph-python HOLD=harness,harness-workers exit=0 services_csv=showcase-langgraph-python held_csv=harness,harness-workers closure_csv=aimock,pocketbase,dashboard,showcase-langgraph-python closure_plan=0:aimock,0:pocketbase,1:dashboard,2:showcase-langgraph-python ### INPUT=showcase-aimock HOLD=harness,harness-workers closure_plan=0:aimock,0:pocketbase,1:dashboard ### INPUT=langgraph-python HOLD=harnes ::error::Cannot hold 'harnes': it does not match exactly one SSOT service (key or dispatch_name). exit=1 ### INPUT=langgraph-python HOLD=langgraph-python ::error::Cannot hold 'showcase-langgraph-python': it is the service this run promotes. Remove it from 'hold' or pick another service. exit=1 ``` Step summary: ``` **Held, unchanged** (`hold` input — NOT promoted; prod keeps its current image and the prod gates run against it): - `harness` - `harness-workers` ``` End to end: the resolver output (with `DIGEST` set) goes into promote-fleet, which runs against the fake railway. Exit 0: ``` Attempted 4 service(s) from CLOSURE_PLAN (tier-ordered). SUCCEEDED (4): aimock pocketbase dashboard showcase-langgraph-python HELD (2): harness harness-workers FAILED (0): (none) railway invocations: promote aimock --yes --non-interactive promote dashboard --yes --non-interactive promote pocketbase --yes --non-interactive promote showcase-langgraph-python --yes --non-interactive --digest ghcr.io/copilotkit/x@sha256:deadbeef ``` Same plan without `DIGEST_SERVICE`: refused, 0 railway calls. Plan with a held service added back in: refused, 0 railway calls. ### Review fix (aab5124): `hold` fails closed Mark found that a multi-line `hold` value (`"harness, harness-workers"`) held only `harness` and still promoted `harness-workers`, with exit 0. The resolver now rejects any character outside `[a-z0-9, -]`, including CR, LF and tab. It also rejects a held service that is not in the closure (no silent no-op). All validation runs before any output is written. 5 bats regressions were added; 4 of them fail on d572327 and all pass now. ### Review fix (c2fa495): held services are verified; HELD_CSV fails closed - **Held services are now verified in prod.** promote-fleet emits `verify_csv`: the succeeded set plus the held set, with failed and not-attempted services excluded. `verify-prod`, `compatibility-refresh` and the equivalence re-sweep now read `verify_csv`, so prod is checked for the held services on their current image. `succeeded_csv` stays the mutation set. Before: with `service=all` and `hold=showcase-langgraph-python`, `succeeded_csv` had 41 services and no langgraph-python. After: `verify_csv` has 42 and includes it. - **`HELD_CSV` fails closed in promote-fleet.** The whole value is validated with the same rule as the resolver: no CR, LF, tab or other character, and each token must be a plain name. Before: `HELD_CSV=$'svc-outside,\nsvc-h'` promoted `svc-h` with exit 0. After: refused, with 0 railway calls. ### Review fix (3d88a9a): one input guard, and the service is passed after `--` Mark's repro: `SERVICES_CSV=--yes HELD_CSV=shell` (and `CLOSURE_PLAN=2:--yes`) made the fleet call `promote --yes --yes --non-interactive`. The real CLI's OptionParser read the service as a flag, so `options[:service]` was nil. It promoted the **whole fleet**, including the held `shell`, and the wrapper exited 0 and reported shell as HELD. - New `showcase/scripts/promote-input-guard.sh`, sourced by both the resolver and promote-fleet, is the one input guard. Every value is validated whole, before parsing, and the run stops before any CLI call. A service list must be `[a-z0-9-]` SSOT names joined by commas: no CR/LF/tab/space, no empty entry, no leading `-`. A digest may contain only image-ref characters and must not start with `-`. The guard covers resolver `service`/`hold`/`digest` and fleet `SERVICES_CSV`, `CLOSURE_PLAN` (the name after `N:`), `HELD_CSV`, `DIGEST_SERVICE` and `DIGEST`. - promote-fleet now calls `promote --yes --non-interactive [--digest D] -- <svc>`. I checked offline against the real CLI that `--` keeps the service positional; `-- --yes` is rejected as an unknown service. - Behavior change: stray commas and whitespace in `SERVICES_CSV`/`CLOSURE_PLAN` (previously skipped or trimmed) and spaces in `hold` now fail closed. The four old tolerance tests were rewritten to assert that. Before/after on the real `bin/railway` PromoteCommand with an intercepted transport (fake GQL/GHCR, no network): ``` c2fa495 SERVICES_CSV=--yes HELD_CSV=shell CLI argv: ["--yes", "--yes", "--non-interactive"] CLI parsed service: nil (nil = WHOLE-FLEET promote) CLI pinned prod services: prod-aimock prod-harness prod-shell SUCCEEDED (1): --yes / HELD (1): shell / exit=0 3d88a9a SERVICES_CSV=--yes HELD_CSV=shell ::error::promote-fleet: SERVICES_CSV entry '--yes' starts with '-' and would be read as a CLI option; refusing to promote anything. 0 CLI calls, exit=1 ``` `CLOSURE_PLAN=2:--yes`, `--foo` and `-x` behave the same way: refused, 0 CLI calls, exit 1. A normal plan, `CLOSURE_PLAN=0:aimock,2:shell` with `DIGEST_SERVICE=shell` and `HELD_CSV=harness`, pins exactly `prod-aimock` and `prod-shell`. The digest goes only to shell. ### Review fix (a12ca33): empty names in closure plan entries Before this fix, `CLOSURE_PLAN='0:,2:showcase-ag2'` passed the tier check. The empty name vanished when the names were joined, and the leaf promoted with exit 0. Each `tier:name` entry's name is now checked by the guard on its own, before joining. Leading (`0:,2:x`), repeated (`0:x,1:,2:y`) and trailing (`...,2:`) empty names are refused with 0 CLI calls. Before this fix, `0:,2:svc-a` reached the CLI in bats, and `0:,2:showcase-ag2` did the same against the real CLI. ### Review fix (10d384d): step summary names the actual mutation plan The resolver step summary used to say the leaf was "what actually promotes now" and called the tiered closure equivalence-only. In fact the promote job runs promote-fleet from `closure_plan`. For `service=agno` with `hold=harness,harness-workers` it promotes `aimock`, `pocketbase`, `dashboard` and `showcase-agno`. The summary now lists **Requested service(s)** separately and labels the filtered closure as the **Mutation plan** (what this run actually promotes in prod). Held services are still listed as **Held, unchanged**. A bats assertion covers this. ## Tests and lint - `bats resolve-promote-targets.bats promote-fleet.bats`: 88/88 ok. The full `showcase/scripts/__tests__/` directory: 212/212 ok. Run locally on macOS bash 3.2. CI runs the same suite on ubuntu bash 5 (`showcase_validate.yml`). - The intermediate commit (digest scope only) also passes on its own: 55/55. - `shellcheck` 0.11.0: clean on both scripts. - `oxfmt --check` on the workflow: clean. - `vitest registry-validation-workflows.test.ts sync-promote-service-options.test.ts`: 29/29. `sync-promote-service-options.ts` regenerates with no diff. - `actionlint`: one finding, the self-repository `uses: $/...` call. This is already on `main` and documented in the workflow (rhysd/actionlint#760). Nothing new. ## Risks - **Version skew is the intended effect.** A promoted service runs in prod against the held harness/workers (and anything else held) at their current images. Nothing proves before the pin that the new service image works with the old harness. The gates after the promote (per-service prod probe, equivalence re-sweep, compatibility refresh) run against the held images and red the run if the pair is broken. But by then the service is already pinned, so recovery means rolling that service back. - **Equivalence re-sweep across harness versions.** The re-sweep compares prod rows (from the held prod harness) to staging rows (from staging's harness). If the two harness versions probe differently, the gate can fail even when the service is fine. It can also miss a real regression. The gate is reported, not suppressed. - **Holding a dependency of the requested service is allowed.** For example, `hold=aimock` while promoting an integration that uses aimock. That is the operator's decision, and the step summary shows it. - **Behavior change for direct `promote-fleet.sh` callers.** A caller that sets `DIGEST` on a multi-service plan without `DIGEST_SERVICE` is now refused instead of pinning every service to one image. The workflow always sets `DIGEST_SERVICE`. - **Not run against real infrastructure.** By design, this PR dispatched no workflow and made no Railway call. The first real use is a `workflow_dispatch` with `hold=harness,harness-workers`.
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.
No description provided.