Skip to content

feat: pitty — PTY-based CLI testing framework#1

Merged
kexi merged 2 commits into
mainfrom
feat/init
Jun 7, 2026
Merged

feat: pitty — PTY-based CLI testing framework#1
kexi merged 2 commits into
mainfrom
feat/init

Conversation

@kexi

@kexi kexi commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • PTY-based CLI testing framework: runs a program inside a real pseudo-terminal, simulates keystrokes/stdin, and asserts on streamed output, file changes, and process state — all driven by declarative YAML scenarios.
  • Assertions: expect/expect_regex/expect_not, expect_file_*, expect_exit/expect_running, plus structured expect_json (dotted + bracket paths), expect_snapshot, and expect_semantic (lexical).
  • Run modes: run, list, init, matrix (multi-axis Cartesian product with a cell-count cap), and bench (duration stats + flaky detection).
  • Stable v1 scenario format (versioned, deny_unknown_fields at top level) with a hand-written JSON Schema and contract tests; secret masking across every output sink; single-trust model.
  • GitHub Actions integration: step-summary + annotations, a composite action (uses: kexi/pitty@v1), and tag-driven prebuilt-binary release automation.

Test plan

  • nix develop --command cargo test (unit + contract) passes
  • cargo test --test e2e -- --ignored (real-PTY dogfood) passes
  • cargo clippy --all-targets -- -D warnings and cargo fmt --check clean
  • pitty run e2e/scenarios/positive exits 0; pitty matrix/pitty bench work end to end
  • CI green on Linux + macOS gates

kexi and others added 2 commits June 7, 2026 11:04
PTY execution, keystroke/stdin simulation, and output/file/process
assertions driven by declarative YAML scenarios, with a stable v1
scenario format, JSON/snapshot/semantic assertions, matrix (multi-axis
Cartesian product) and bench modes, GitHub Actions integration, and
prebuilt-binary release automation. single-trust model with secret
masking across every output sink.

Co-Authored-By: Claude <noreply@anthropic.com>
Rebrand from ptytest to pitty across the crate (package/lib/bin), the
PittyError type, PITTY_* env vars, kexi/pitty repo refs and prebuilt
asset names, the scenario schema/config files, and all docs. Canonical
description is now "PTY-based CLI testing framework".

Co-Authored-By: Claude <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedthiserror@​1.0.698110093100100
Addedserde@​1.0.2288110093100100
Addedserde_json@​1.0.1508210093100100
Addedclap@​4.6.19910093100100
Addedportable-pty@​0.8.110010093100100
Addedregex@​1.12.310010093100100
Addedserde_norway@​0.9.4210010093100100
Addedtempfile@​3.27.09810093100100
Addedsimilar@​2.7.010010095100100

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: cargo libc is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?cargo/libc@0.2.186

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/libc@0.2.186. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@kexi kexi merged commit ff6cc6c into main Jun 7, 2026
8 checks passed
@kexi kexi deleted the feat/init branch June 7, 2026 02:35
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