Skip to content

[agent] polyglot Java/TS/C#/Python/Rust verification and self-recovery (FEATURE_SPEC 5.2, 5.4, 5.5) - #820

Merged
R4yHarris merged 5 commits into
mainfrom
agents/open-source-library-testing-report
Dec 2, 2026
Merged

R4yHarris merged 5 commits into
mainfrom
agents/open-source-library-testing-report

Conversation

@r4yharris-agent-coder

Copy link
Copy Markdown
Contributor

feat(execution,planning,seats): polyglot Java/TS/C#/Python/Rust verification and self-recovery (FEATURE_SPEC 5.2, 5.4, 5.5)

Model

GPT-6.1-Sol

Summary

Land reviewed Iterations 1-6b from multi-round local OSS library testing across Java, TypeScript/JavaScript, C#, Python, and Rust (docs/FEATURE_SPEC.md sections 5.2, 5.4, 5.5):

  • Polyglot ask intake & planning (rust/planning/{intake,artifacts,grounding,lifecycle,tools}.rs): Recognize .cs, .csproj, .sln/.slnx, .props, .targets, .java, .kt/.kts, .gradle, .go, .mts, and .cts in ask path extraction; treat C# and Java scopes as non-Node languages so node --test exits 0 is not injected; skip tracked symlinks via symlink_metadata before containment checks.
  • Native TypeScript execution (rust/execution/{policy,tools,counterfactual}.rs): Discover .test.ts / .spec.ts suites, enable modern Node 22/24 for tsconfig.json repos, and pass a zero-dependency Node --import registerHooks resolver so TypeScript NodeNext .js imports resolve to sibling .ts files natively.
  • Java Maven/Gradle verification (rust/execution/{tools,evidence}.rs): Add java_checks with fail-closed find_javac() JDK preflight before coder turns, offline -B -o test -DfailIfNoTests=false, JAVA_HOME/bin PATH wiring, observation_contract support, and Maven target/ / Gradle build/ exclusion in evidence::capture.
  • C#/.NET verification hardening (rust/execution/{tools,evidence}.rs): Add dotnet_checks with offline NuGet restore, DOTNET_ROLL_FORWARD, custom MSBuild bin/$( detection before passing -p:UseArtifactsOutput=true, automatic unfiltered retry on executed == 0, TRX validation, and .NET bin//obj/ exclusion.
  • Rust verification & counterfactual self-recovery (rust/execution/{tools,counterfactual}.rs, rust/seats/coder.rs): Support lock-free Rust crates with generated Cargo.lock cleanup, base Cargo.lock counterfactual propagation, nightly benches/ E0554 fallback from cargo check --all-targets to --lib --bins --tests --examples, missing-API compile error recognition (E0599/E0425/E0412/E0432/E0433) for Cargo new-feature counterfactuals, and language-aware counterfactual repair hints.
  • Universal Git index seal protection & truthful diagnostics (rust/execution/{tools,result,self_review}.rs): Set GIT_OPTIONAL_LOCKS=0 in Host::command so build tools invoking git (e.g., .NET SourceLink) cannot trigger false-positive IndexSeal revocations; preserve head+tail test output in RESULT.md and self_review.rs, and report the actual executed test command.

How to test

Run cargo fmt --all -- --check, cargo clippy --all-targets --locked --offline -- -D warnings, and cargo test --locked --offline from the feature worktree root.

AI-Agent: r4yharris-agent-coder
AI-Model: GPT-6.1-Sol

1|github-copilot|GPT-6.1-Sol@-|x|-/1000000|-|ghcp-20261201-41812|open-source-library-testing-report

…ication and self-recovery (FEATURE_SPEC 5.2, 5.4, 5.5)

## Model

GPT-6.1-Sol

## Summary

Land reviewed Iterations 1-6b from multi-round local OSS library testing across Java, TypeScript/JavaScript, C#, Python, and Rust (`docs/FEATURE_SPEC.md` sections 5.2, 5.4, 5.5):

- **Polyglot ask intake & planning (`rust/planning/{intake,artifacts,grounding,lifecycle,tools}.rs`):** Recognize `.cs`, `.csproj`, `.sln`/`.slnx`, `.props`, `.targets`, `.java`, `.kt`/`.kts`, `.gradle`, `.go`, `.mts`, and `.cts` in ask path extraction; treat C# and Java scopes as non-Node languages so `node --test exits 0` is not injected; skip tracked symlinks via `symlink_metadata` before containment checks.
- **Native TypeScript execution (`rust/execution/{policy,tools,counterfactual}.rs`):** Discover `.test.ts` / `.spec.ts` suites, enable modern Node 22/24 for `tsconfig.json` repos, and pass a zero-dependency Node `--import` `registerHooks` resolver so TypeScript NodeNext `.js` imports resolve to sibling `.ts` files natively.
- **Java Maven/Gradle verification (`rust/execution/{tools,evidence}.rs`):** Add `java_checks` with fail-closed `find_javac()` JDK preflight before coder turns, offline `-B -o test -DfailIfNoTests=false`, `JAVA_HOME/bin` PATH wiring, `observation_contract` support, and Maven `target/` / Gradle `build/` exclusion in `evidence::capture`.
- **C#/.NET verification hardening (`rust/execution/{tools,evidence}.rs`):** Add `dotnet_checks` with offline NuGet restore, `DOTNET_ROLL_FORWARD`, custom MSBuild `bin/$(` detection before passing `-p:UseArtifactsOutput=true`, automatic unfiltered retry on `executed == 0`, TRX validation, and `.NET` `bin/`/`obj/` exclusion.
- **Rust verification & counterfactual self-recovery (`rust/execution/{tools,counterfactual}.rs`, `rust/seats/coder.rs`):** Support lock-free Rust crates with generated `Cargo.lock` cleanup, base `Cargo.lock` counterfactual propagation, nightly `benches/` `E0554` fallback from `cargo check --all-targets` to `--lib --bins --tests --examples`, missing-API compile error recognition (`E0599`/`E0425`/`E0412`/`E0432`/`E0433`) for Cargo new-feature counterfactuals, and language-aware counterfactual repair hints.
- **Universal Git index seal protection & truthful diagnostics (`rust/execution/{tools,result,self_review}.rs`):** Set `GIT_OPTIONAL_LOCKS=0` in `Host::command` so build tools invoking `git` (e.g., .NET SourceLink) cannot trigger false-positive `IndexSeal` revocations; preserve head+tail test output in `RESULT.md` and `self_review.rs`, and report the actual executed test command.

### How to test

Run `cargo fmt --all -- --check`, `cargo clippy --all-targets --locked --offline -- -D warnings`, and `cargo test --locked --offline` from the feature worktree root.

AI-Agent: r4yharris-agent-coder
AI-Model: GPT-6.1-Sol
AI-Run: 1|github-copilot|GPT-6.1-Sol@-|x|-/1000000|-|ghcp-20261201-41812|open-source-library-testing-report
@r4yharris-agent-coder
r4yharris-agent-coder Bot marked this pull request as ready for review December 1, 2026 21:29
r4yharris-agent-coder Bot and others added 4 commits December 1, 2026 23:43
…ss TS hook, skip Apache RAT, and recognize Rust trait counterfactuals (FEATURE_SPEC 5.2, 5.4)

## Model

GPT-6.1-Sol

## Summary

Land reviewed Iteration 7 self-recovery improvements validated by a 5/5 all-language sweep (`honojs/hono`, `apache/commons-lang`, `nodatime/nodatime`, `pypa/packaging`, `rust-lang/semver`) under `docs/FEATURE_SPEC.md` sections 5.2 and 5.4:

- **TypeScript co-located test discovery, `full == true` scoping, and zero-dep Vitest/extensionless hook (`rust/execution/{policy,tools,counterfactual}.rs`):** Discover co-located `{dir}/{base}.test.ts` / `.spec.ts` files, retain scoped `tests` args during `full == true` for `.ts` suites instead of scanning unrelated monorepo files, and upgrade shared `TS_IMPORT_HOOK` to resolve extensionless `./foo` imports (`./foo.ts` / `./foo/index.ts`) and provide a lightweight `node:test` + `node:assert/strict` global shim when Vitest/Jest globals are absent.
- **Apache Maven RAT worktree immunity (`rust/execution/tools.rs`):** Pass `-Drat.skip=true` in `java_checks()` so Apache Maven projects do not fail on Roster's license-headerless managed worktree files (`TASK.md`, `RECIPE.yml`, `RESULT.md`, `REVIEW.md`).
- **Rust trait-impl counterfactual support (`rust/execution/counterfactual.rs`):** Add `error[E0369]` and `error[E0277]` to Cargo `base_missing_api` compile-error detection when the candidate compiles cleanly and passes all named tests.

### How to test

Run `cargo fmt --all -- --check`, `cargo clippy --all-targets --locked --offline -- -D warnings`, and `cargo test --locked --offline` from the feature worktree root.

AI-Agent: r4yharris-agent-coder
AI-Model: GPT-6.1-Sol
Added Rust toolchain setup and integrated formatting, clippy, and tests into the workflow.
…:linked and Cargo 1.100 cache-rebuild test layout (FEATURE_SPEC 5.4)

## Model

GPT-6.1-Sol

## Summary

Resolve both Rust 1.100 CI issues under `docs/FEATURE_SPEC.md` section 5.4:

- **`rust/state/secure.rs` (`linked`):** Simplify platform-conditional `is_symlink()` check so `cargo clippy --all-targets --locked -- -D warnings` passes cleanly on Rust 1.100 (`clippy::needless_bool`) on both Linux and Windows without `#[allow]`.
- **`rust/seats/tests/focused_review.rs` (`review_repro_native_cache_rebuild_cannot_count_as_test_repair_progress`):** Remove `debug/.fingerprint` when present (Cargo <= 1.99) and fall back to removing `debug/` for Cargo 1.100+'s new `target/debug/build/` layout so the cache-rebuild test works across all Cargo versions.

### How to test

Run `cargo fmt --all -- --check`, `cargo clippy --all-targets --locked -- -D warnings`, and `cargo test --locked` with `ROSTER_NODE20`, `ROSTER_TEST_NODE`, and `GITHUB_AGENT_CONTRACTS` set.

AI-Agent: r4yharris-agent-coder
AI-Model: GPT-6.1-Sol
… branch in detached-HEAD test clones (FEATURE_SPEC 5.4)

## Model

GPT-6.1-Sol

## Summary

Fix all remaining GitHub Actions `ubuntu-latest` CI test failures under `docs/FEATURE_SPEC.md` section 5.4:

- **`rust/vault/platform.rs` (`Pending`):** Keep the newly created temporary file descriptor open on Unix (`_pinned: File`) until `Pending` drops, physically preventing Linux ext4/tmpfs from reusing the freed inode after an unlink+create replacement and guaranteeing `Pending::publish` deterministically rejects foreign temp-file swaps (`VaultError::Changed`).
- **`rust/execution/tests.rs` (`Fixture::with_object_format`):** When cloning `CARGO_MANIFEST_DIR` in a detached-HEAD checkout (such as GitHub Actions `actions/checkout@v4`), attach `HEAD` to `refs/heads/fixture-base` via `update-ref` + `symbolic-ref` while preserving `--no-checkout`, fixing all 17 `execution::tests::*` detached-HEAD checkpoint failures.

### How to test

Run `cargo fmt --all -- --check`, `cargo clippy --all-targets --locked -- -D warnings`, and `cargo test --locked` in a detached-HEAD checkout with `ROSTER_NODE20`, `ROSTER_TEST_NODE`, and `GITHUB_AGENT_CONTRACTS` set.

AI-Agent: r4yharris-agent-coder
AI-Model: GPT-6.1-Sol
@R4yHarris
R4yHarris merged commit 8c85728 into main Dec 2, 2026
2 checks passed
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