Skip to content

Issue fixes: Rust ARM discovery robustness + CI/toolchain reproducibility (#445, #474, #475, #477) - #482

Merged
Seth Juarez (sethjuarez) merged 4 commits into
mainfrom
sejuare-microsoft/prs-issues-runtimes
Aug 19, 2026
Merged

Seth Juarez (sethjuarez) merged 4 commits into
mainfrom
sejuare-microsoft/prs-issues-runtimes

Conversation

@sethjuarez

Copy link
Copy Markdown
Member

Summary

This PR lands the self-contained, individually-tested issue fixes from the open backlog. Each was rubber-ducked and verified locally.

Closes #445
Closes #474
Closes #475
Closes #477

Changes

#445 — Rust ARM discovery skips non-object page entries

fetch_all accumulated every entry in an ARM value array, so a stray non-object entry produced a phantom Foundry project that suppressed the classic-hub (S2) fallback. Extracted a pure page_objects(body) helper that keeps only JSON objects, and wired it into fetch_all. Added two regression tests mirroring the Java runtime's nonObjectEntriesAreSkipped for cross-runtime parity.

  • cargo test -p prompty-foundry --lib → 53 pass
  • cargo fmt --check → clean
  • cargo clippy → clean

#474 — Pin repo-wide Rust and .NET toolchains (schema reproducibility root cause)

Added root rust-toolchain.toml (1.97.1 + rustfmt/clippy) and root global.json (9.0.317, rollForward: latestFeature) so npm run generate and formatter runs are deterministic. Chose latestFeature (not disable) so existing 9.0.x setup-dotnet CI jobs don't break while still blocking a 10.x jump. Simplified schema-repro-check.yml by removing the ephemeral global.json write/cleanup steps now that the file is committed.

  • dotnet --version → 9.0.317
  • rustup resolves 1.97.1; cargo fmt --check clean

#477 — Run the schema reproducibility check weekly

Added a schedule: cron '17 9 * * 1' trigger to schema-repro-check.yml and wired the new pin files into its trigger paths, so drift is caught even without a PR touching schema.

#475 — Prettier format check for hand-written TypeScript

Added root format / format:check scripts scoped to packages/*/src/** and excluding the Typra-emitted packages/*/src/model/** (prettier ! negation rather than a .prettierignore, which the emitter's own prettier run would otherwise honor and cause drift). Reformatted 37 hand-written files to prettier 3.9.6; zero generated files touched. Added the check to TS CI.

  • build success; 1973 tests pass (1811 + 91 + 47 + 24); tsc --noEmit clean

Triage — left open (valid, not stale)

Deferred (documented, not in this PR)

PRs #438, #447, #439 (Swift), #444 (Java) are ~37 commits stale across the major restructure + schema regeneration. Per the project principle, emitted files must never be hand-edited — these require rebase onto main, .tsp source edits, npm run generate (now reproducible thanks to the #474 pins), then behavior porting + per-runtime tests. Landing this PR first provides the reproducible toolchain needed to do that correctly.

agent &&
parentInputs &&
typeof parsedArgs === "object" &&
parsedArgs !== null &&
fetch_all accumulated every value-array entry, so a stray non-object entry (null/string/number) in the S1 projects response became a phantom FoundryProject with empty fields. That made projects non-empty and suppressed the classic-hub (S2) fallback, hiding the real projects.

Extract a page_objects helper that keeps only JSON objects and call it from fetch_all, mirroring the Java runtime's paging helper so the two behavioural references agree. Add regression tests analogous to Java's FoundryArmTest.Paging.nonObjectEntriesAreSkipped.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add a root rust-toolchain.toml (channel 1.97.1 + rustfmt/clippy) and a root global.json (9.0.317, rollForward latestFeature) so local and CI toolchains agree by construction. rustup, cargo, dtolnay/rust-toolchain and the .NET CLI all honour these files, which is what makes 'npm run generate' reproducible off-CI and stops false generated-code drift in schema-repro-check.

global.json uses rollForward: latestFeature (not disable) so it stays compatible with every 9.0.x setup-dotnet pin already used across the C# workflows, while blocking accidental roll to 10.x. dotnet format output was measured SDK-invariant, so exactness is unnecessary and would needlessly break contributors.

Simplify schema-repro-check.yml: the committed global.json replaces the ephemeral one the job wrote and deleted, so both steps are removed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add a weekly schedule trigger to schema-repro-check so drift from inputs no path filter can see — a runner image rotating its default SDK, a transitive formatter dep, a base image bump — is surfaced on a fixed cadence instead of on an unrelated contributor's next schema PR. Largely subsumed by the committed toolchain pins (#474); kept as a backstop for what those pins cannot bind.

Also add rust-toolchain.toml and global.json to the pull_request trigger paths, since bumping either changes the rustfmt / dotnet format version the emitter uses.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
packages/*/lint was only 'tsc --noEmit', so hand-written TypeScript had no formatting verification. That let the prettier 3.8.3 -> 3.9.6 bump in #465 sit unnoticed on main until an unrelated schema-repro run found it four months later.

Add root 'format' and 'format:check' scripts (prettier over packages/*/src, excluding the Typra-emitted packages/*/src/model so this hand-written check never polices generated code — that stays schema-repro-check's job), reformat the 37 hand-written source files to prettier 3.9.6 (the repo's own lockfile version), and run 'npm run format:check' in the TypeScript CI. Generated model/ was already 3.9.6-clean and is untouched; build, tests and tsc all pass.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@sethjuarez
Seth Juarez (sethjuarez) force-pushed the sejuare-microsoft/prs-issues-runtimes branch from 81f476f to c11a9a7 Compare August 19, 2026 01:12
@sethjuarez
Seth Juarez (sethjuarez) merged commit 2062b9e into main Aug 19, 2026
23 checks passed
@sethjuarez
Seth Juarez (sethjuarez) deleted the sejuare-microsoft/prs-issues-runtimes branch August 19, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant