Skip to content

Fix review follow-ups from key and CLI PRs#248

Merged
senamakel merged 2 commits into
tinyhumansai:mainfrom
naturedesk:fix/review-followups-after-244-245
Jul 14, 2026
Merged

Fix review follow-ups from key and CLI PRs#248
senamakel merged 2 commits into
tinyhumansai:mainfrom
naturedesk:fix/review-followups-after-244-245

Conversation

@naturedesk

@naturedesk naturedesk commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • align the Python base64 public-key route heuristic with the TypeScript SDK, including ASCII-only matching and at most two padding characters
  • add regression coverage for over-padded and Unicode-containing base64-like IDs staying on the legacy route
  • replace the function-scoped dynamic import("node-pty") in the CLI harness with the existing createRequire loader, preserving lazy loading while following SDK import rules

Verification

  • uv run --with pytest --with pytest-asyncio --with-editable . pytest -o addopts='' tests/test_api_namespaces.py
  • sdk/typescript/node_modules/.bin/vitest run sdk/typescript/tests/cli.test.ts
  • sdk/typescript/node_modules/.bin/tsc --noEmit --project sdk/typescript/tsconfig.json --pretty false

Refs #213
Refs #216
Refs #217
Follow-up to #244 and #245.

Summary by CodeRabbit

  • Bug Fixes
    • Improved detection of public-key identifiers, preserving non-canonical or invalid base64-like IDs on the legacy key endpoint.
    • Ensured unusual identifiers, including padded and non-ASCII values, are correctly URL-encoded.
    • Improved terminal session startup reliability, with automatic fallback to pipe-based execution when needed.

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

@naturedesk is attempting to deploy a commit to the Vezures Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c57aad5a-38c0-4a55-a232-b75213e2f48c

📥 Commits

Reviewing files that changed from the base of the PR and between 5c40d06 and aa46bc2.

📒 Files selected for processing (3)
  • sdk/python/src/tinyplace/api/keys.py
  • sdk/python/tests/test_api_namespaces.py
  • sdk/typescript/src/cli/harness-wrapper.ts

📝 Walkthrough

Walkthrough

The Python SDK now uses regex-based base64-like public-key detection and tests legacy routing for non-canonical identifiers. The TypeScript PTY harness synchronously loads node-pty through requireForHarness.

Changes

Python key routing

Layer / File(s) Summary
Regex-based key detection
sdk/python/src/tinyplace/api/keys.py, sdk/python/tests/test_api_namespaces.py
_looks_like_base64_public_key uses a full-match regex for the allowed alphabet and optional padding; tests verify non-canonical IDs remain on the legacy route with encoded path segments.

TypeScript PTY loading

Layer / File(s) Summary
Synchronous PTY module loading
sdk/typescript/src/cli/harness-wrapper.ts
PTY startup loads node-pty with requireForHarness while preserving spawn access and fallback behavior.

Estimated code review effort: 2 (Simple) | ~10 minutes

Poem

I’m a rabbit with keys in my den,
Regex keeps odd paths safe again.
PTYs hop with a synchronous cheer,
Encoded IDs travel clear.
Carrots and tests make the route bright!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is related to the actual changes, covering follow-ups in the key and CLI areas.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@senamakel
senamakel merged commit e24803e into tinyhumansai:main Jul 14, 2026
9 of 10 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.

2 participants