Skip to content

chore: add the verify-libghostty-vt-node driving skill - #25

Merged
ThomasK33 merged 5 commits into
mainfrom
skills/verify-libghostty-vt-node
Oct 29, 2026
Merged

ThomasK33 merged 5 commits into
mainfrom
skills/verify-libghostty-vt-node

Conversation

@ThomasK33

@ThomasK33 ThomasK33 commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Adds .agents/skills/verify-libghostty-vt-node/, a project skill that verifies the package the way a user gets it from npm.

How it works

  1. scripts/launch.sh builds the checkout, packs it with a prebuild for this platform, and installs the tarball into a scratch consumer project outside the checkout.
  2. scripts/doctor.sh is read-only. It checks that the bare import resolves inside the consumer, that the packed prebuild loads, and that the build still matches the checkout (STALE otherwise).
  3. scripts/drive.sh runs one Node journey that imports @coder/libghostty-vt-node by name. It keeps the script, stdout, stderr, and exit code as evidence.
  4. scripts/cleanup.sh removes the instance and keeps the evidence. It also cleans up after a failed launch.

features/ maps five user-facing features to 18 literal journeys that assert their own results: text and debug formatters, snapshot, resize, lifecycle and errors (worker threads included), and install and native info.

Proof

  • On this stack's fixed build: launch, doctor (exit 0), all 18 journeys exit 0, cleanup. All 18 journey evidence directories were still there after cleanup.
  • Before the fix, the same map gave 17/18. lifecycle-workers was killed by a signal (exit 139), which is the bug the bottom PR fixes.
  • A fresh agent with no context followed SKILL.md cold: launch, doctor, the four snapshot journeys, and cleanup all worked as written. I fixed the wording gaps it reported.
  • A launch in a fresh copy covered the npm ci and build:libghostty paths.
  • A failed launch (bad LIBGHOSTTY_VT_PREFIX) left an instance that doctor.sh rejects and cleanup.sh removes.
  • launch.sh refuses a symlinked, group-writable, or open-parent RUN_ROOT and one that resolves into the checkout, before it creates anything. It reruns npm ci and build:libghostty when their inputs change, builds from an empty dist/, and fails when the checkout changes during the launch. I tested each of these.

Almost all of the diff is Markdown journeys and four shell scripts.


Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high

Adds a project skill that verifies the package the way a user gets it:
launch.sh builds and packs the checkout with a prebuild for this
platform and installs the tarball into a scratch consumer project.
doctor.sh checks that the bare import resolves inside the consumer and
loads the packed prebuild. drive.sh runs one Node journey that imports
@coder/libghostty-vt-node by name and keeps stdout, stderr and the exit
code as evidence. cleanup.sh removes the instance and keeps the
evidence.

features/ maps five user-facing features (text, snapshot, resize,
lifecycle and errors, install and native info) to 19 literal journeys
that assert their own results.

_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_

Change-Id: Ic299a2c8a99e1b9fc58835f2612873130f5532a5
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33
ThomasK33 added this pull request to stack #26 October 29, 2026 13:09
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T17:54:07.961228Z 676de35 Manual request
🔒 Security Review ✅ Completed 2026-10-29T14:31:54.838933Z 676de35 Manual request

Security findings

Advisory findings (2)

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: f9f51654e1

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9f51654e1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh Outdated
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh Outdated
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh Outdated
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh Outdated
Comment thread .agents/skills/verify-libghostty-vt-node/features/lifecycle.md
…-node

Change-Id: I1d4d4ea69f03d1e5a85f71590638f8498fe52864
Signed-off-by: Thomas Kosiewski <tk@coder.com>
- Refuse a RUN_ROOT that another account can change (a symlink, a
  directory not owned by you or writable by group or others, or one in a
  parent that others can write without the sticky bit), and check the
  checkout boundary before creating anything. npm install runs package
  scripts from the tarball in RUN_ROOT.
- Rerun npm ci and build:libghostty when their inputs changed, using a
  stamp with the hash of package-lock.json, or of the build script and
  the GHOSTTY_ / LIBGHOSTTY_VT_ variables.
- Build from an empty dist/, so npm pack cannot ship stale output.
- Record the checkout state before the build and fail if it changes
  before the end.
- lifecycle-gc claims only what JS can see: V8 collected the Terminal
  objects and the process survived.

_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_

Change-Id: Iad83169a805a150caaf433b81588de523ffc489f
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Codex Security Review

Here are some automated security review suggestions for this pull request.

Reviewed commit: db70475143

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh Outdated
The parent check exempted a group-writable parent that you own, but any
group member can rename the 0700 RUN_ROOT inside it and swap the
tarball. launch.sh now walks every directory above RUN_ROOT and refuses
one that another account owns (root excepted) or that group or others
can write without the sticky bit.

_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_

Change-Id: I7a31693d4d2846366c411e7998a15a2a05b9ed7f
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 0821d9253f

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0821d9253f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/doctor.sh Outdated
Comment thread .agents/skills/verify-libghostty-vt-node/features/lifecycle.md
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh Outdated
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/drive.sh Outdated
- launch.sh checks the ancestors of RUN_ROOT as given and of its
  physical path, and uses the physical path that the check returns
  instead of resolving RUN_ROOT again.
- launch.sh refuses a RUN_ROOT whose evidence/ already holds evidence,
  so one RUN_ROOT holds one launch.
- instance.json records the sha256 of the loaded addon and of the
  libghostty-vt static library, with the hash of its build inputs.
- drive.sh reserves each evidence directory with one mkdir.
- doctor.sh compares the resolved file path, not the file URL, so a
  RUN_ROOT with a space passes.
- lifecycle-workers fails after 20 s instead of hanging.

_Generated with [`xum`](https://github.com/coder/xum) • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_

Change-Id: Ie8dc0b6f9bae72da5857608d30bf73a5d4b80977
Signed-off-by: Thomas Kosiewski <tk@coder.com>
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex security review

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 676de35e90

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 676de35e90

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .agents/skills/verify-libghostty-vt-node/scripts/launch.sh
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/doctor.sh
Comment thread .agents/skills/verify-libghostty-vt-node/scripts/drive.sh
@ThomasK33
ThomasK33 removed this pull request from stack #26 October 29, 2026 17:56
@ThomasK33
ThomasK33 changed the base branch from skills/verify-native-lifecycle to main October 29, 2026 17:57
@ThomasK33
ThomasK33 merged commit 3bcd7a7 into main Oct 29, 2026
4 checks passed
@ThomasK33 ThomasK33 mentioned this pull request Oct 30, 2026
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