Skip to content

feat(devkit): corporate validation kit - #61

Merged
Icaro0310 merged 2 commits into
mainfrom
feat/corporate-validation-kit
Oct 17, 2026
Merged

Icaro0310 merged 2 commits into
mainfrom
feat/corporate-validation-kit

Conversation

@Icaro0310

@Icaro0310 Icaro0310 commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Corporate validation kit

environments/corporate-windows/validation-kit/Invoke-CorporateValidation.ps1 — a single self-contained PS 5.1-compatible script that proves whether the published devin-* distribution works on a locked-down corporate machine (Zscaler/TLS inspection, restricted index, no admin, VS Code Restricted Mode).

What it checks (24 probes)

  • env: PowerShell version, temp writability, MAX_PATH
  • net: PyPI/npm/GitHub reachability + TLS-issuer inspection (detects interception without touching the trust store)
  • tool: python/uv/node/npm/code detection (NOT_DETECTED_VALID when absent)
  • install: pinned installs — devin-search==0.2.1, devin-doctor==0.3.1, devin-qa-pack==0.2.1, poordjaevin==0.1.3, devin-memory==0.3.1, @icaro0310/devin-bridge@0.2.0 — into an isolated temp venv/prefix
  • functional: doctor on empty env, qa-pack non-SQLite fail-closed (0.2.1 regression), search synthetic copilot fixture index+query, judge backend fail-closed (0.1.3 regression), bridge BRIDGE_AGENT_ARGS validation, memory quarantine on a synthetic store
  • offline.wheel_reinstall: staged wheels → pip --no-index reinstall
  • vscode: CLI presence, installed extensions, optional --install-extension (opt-in), documented Restricted Mode procedure (NOT_TESTED until run manually)

Guarantees

  • Read-only on the machine: never touches proxy config, trust store, registry, policies, credentials or real session data
  • Synthetic fixtures only; output sanitized (user paths + token-shaped strings redacted)
  • Result classes: PASS / FAIL_PRODUCT / BLOCKED_ENVIRONMENT / NOT_DETECTED_VALID / NOT_TESTED / UNVERIFIED
  • Emits results.json + report.md; exit 1 only on FAIL_PRODUCT

Verified in this session (pwsh 7, Linux)

22 PASS · 0 FAIL_PRODUCT · 0 BLOCKED · 2 NOT_TESTED (Restricted Mode + opt-in ext install). -Offline and -Only modes exercised. 11 pytest cases cover PS5.1 syntax constraints, schema, sanitization and real execution under pwsh.

Does not claim a Windows-corporate pass — the kit must still be run on the target machine; that is its purpose.

Generated with Devin


Devin Review

A self-contained, PS 5.1-compatible probe for locked-down corporate
Windows: pinned installs of the published 0.2.1/0.3.1/0.1.3/0.2.0 line
into an isolated venv, synthetic-fixture functional checks (doctor,
qa-pack fail-closed, search index/query, judge backend fail-closed,
bridge args validation, memory quarantine), proxy/TLS-inspection
diagnostics, VS Code CLI detection, an offline --no-index reinstall
proof, and a documented Restricted Mode procedure left as NOT_TESTED
until run by a human.

Emits sanitized results.json + report.md (user paths and token-shaped
strings redacted) with explicit result classes. Never touches proxy
settings, the trust store, the registry, credentials or real session
data. Tested under pwsh 7 on Linux: 22 PASS / 0 FAIL / 2 NOT_TESTED.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Oct 17, 2026

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 13 potential issues.

Devin Review

Comment on lines +674 to +676
$lr = Invoke-Proc $code @('--list-extensions') 60
$exts = ($lr.StdOut -split "`n" | Where-Object { $_ -match 'icaro0310\.' }) -join ', '
Add-Result 'vscode.cli' 'PASS' ("VS Code $($r.StdOut.Split("`n")[0]); installed icaro0310 extensions: " + $(if ($exts) { $exts } else { 'none' })) $lr.StdOut.Substring(0, [Math]::Min(400, $lr.StdOut.Length))

@devin-ai-integration devin-ai-integration Bot Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Extension discovery failure appears successful

vscode.cli ignores code --list-extensions failures. An empty error result becomes PASS with no matching extensions reported.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +114 to +119
$skipHit = $Skip -contains $Id
if ($skipHit) { Add-Result $Id 'NOT_TESTED' 'skipped by -Skip'; return }
if (@($Only).Count -gt 0) {
$onlyHit = $Only -contains $Id
if (-not $onlyHit) { return }
}

@devin-ai-integration devin-ai-integration Bot Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Skipped checks escape the selection filter

Invoke-Check records -Skip results before applying -Only. An unrelated skipped check appears in the selected run's report.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread packages/devkit/environments/corporate-windows/validation-kit/README.md Outdated
- PS5.1 compat: replace $IsWindows/$IsLinux (inexistent on PS 5.1,
  fatal under StrictMode) with OSVersion.Platform detection
- Invoke-Proc: route .cmd/.bat shims through cmd.exe so npm, code and
  package bins actually launch on Windows
- pins: read install_spec from the bundled devkit manifest when present
  so the kit validates what devkit installs; standalone ZIP falls back
  to latest published versions (pin source recorded in evidence)
- classify "index cannot serve spec" as BLOCKED_ENVIRONMENT (covers
  incomplete -WheelDir bundles and filtered mirrors)
- sanitize summary and command fields in Add-Result, closing the
  exception-message leak path in Invoke-Check
- Get-TlsIssuer captures SslPolicyErrors: untrusted chains report
  UNVERIFIED with the issuer, never PASS
- per-run temp root, fully removed at exit (unless OutputDir is inside
  it) so repeated runs stop accumulating venvs/npm trees/wheels

Tests: +6 structural assertions covering each fix; pwsh execution suite
still green (17 kit tests, 123 total, 1 skipped).

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 new potential issues.

Devin Review

Comment on lines +401 to +412
$mf = Get-Content $mc -Raw | ConvertFrom-Json
foreach ($t in @($mf.tools)) {
$spec = "$($t.install_spec)"
if ($spec -match '^@icaro0310/devin-bridge@\S+$') { $BridgeSpec = $spec; continue }
foreach ($pkg in $PyPackages) {
if ($spec -match ('^' + [regex]::Escape($pkg.Name) + '(\[[^\]]*\])?==(\S+)$')) {
$pkg.Spec = $spec
$pkg.Want = $Matches[2]
}
}
}
$PinSource = 'bundled devkit manifest'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Checkout probes test obsolete releases

In a checkout, $PyPackages and $BridgeSpec inherit older manifest pins instead of the releases targeted by the regression probes. The qa-pack and judge probes can fail on their fixed regressions, falsely reporting that the published toolchain is broken.

Learn more

The kit defines fallback pins for the releases its smoke checks intend to validate. In a checkout, the manifest is found and replaces those pins before the checks run. The checked-in manifest pins devin-qa-pack==0.2.0, poordjaevin[local,mcp]==0.1.2, devin-search==0.2.0, and bridge 0.1.0, while the fallback pins are 0.2.1, 0.1.3, 0.2.1, and 0.2.0. The qa-pack probe and judge probe exercise regressions targeted at the later versions, so a checkout can report a product failure for a release the standalone kit does not test.

Example: With the current checkout and an index serving both qa-pack 0.2.0 and 0.2.1, the kit installs 0.2.0. Its bad-database probe tests that older build and can flag the known regression despite 0.2.1 working.

Recommended fix: Keep the manifest pins aligned with the validated releases, or separate manifest compatibility checks from release-specific regression probes. Test the effective installed specs and probe results from an actual checkout run.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines +152 to +155
if ($script:IsWindowsHost -and $File -match '\.(cmd|bat)$') {
$cmdExe = if ($env:ComSpec) { $env:ComSpec } else { 'cmd.exe' }
$psi.FileName = $cmdExe
$psi.Arguments = '/c "' + '"' + $File + '"' + $(if ($argLine) { ' ' + $argLine } else { '' }) + '"'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟥 Batch shim paths execute unintended commands

On Windows, Invoke-Proc passes paths with cmd metacharacters to .cmd shims without shell-safe quoting. A crafted -WheelDir or temp path can execute commands outside the intended validation probe.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@Icaro0310
Icaro0310 merged commit d04e3ba into main Oct 17, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant