dev-guide-runtime-self-check

Diagnose which lingtai runtime code, binaries, and MCP modules are actually executing after a refresh.

692|60|Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Lingtai-AI/lingtai --skill dev-guide-runtime-self-check
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-guide-runtime-self-check
Source: https://github.com/Lingtai-AI/lingtai/tree/main/tui/internal/preset/skills/lingtai-dev-guide/reference/runtime-self-check
Command: npx skills add https://github.com/Lingtai-AI/lingtai --skill dev-guide-runtime-self-check

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

After a refresh, checkout switch, or preset/MCP change, developers often cannot tell whether the lingtai agent is actually running the new code — merged fixes appear to fail because stale imports, polluted PYTHONPATH, or unrebuilt long-lived runtime objects silently persist. This Skill provides a read-only diagnostic checklist to prove what code is live and report it safely.

Core Features & Use Cases

  • Runtime source probing: Identify which lingtai package the agent venv imports, whether it is an editable install, and the git HEAD behind it, including PYTHONPATH pollution detection.
  • Binary and symlink verification: Confirm the active lingtai-tui/portal binaries resolve to the intended worktree and that rebuilds actually landed on PATH.
  • Live object lifecycle checks: Verify that long-lived services, adapters, and caches were genuinely rebuilt after refresh, not just that new source was imported.
  • Safe evidence reporting: Produce a compact, redacted evidence pack with secrets, tokens, chat IDs, and private paths removed.
  • Use Case: A merged kernel fix shows no effect after refresh — run the self-check to discover the agent imports a different checkout, fast-forward it, refresh, and confirm the fix via an in-situ probe.

Quick Start

Run the runtime self-check to verify which lingtai source, binary, and MCP modules this agent is actually executing and report the evidence with secrets redacted.

Frequently Asked Questions about dev-guide-runtime-self-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check which lingtai code my agent is actually running?

Run the import probe with the runtime venv Python (not PATH python) to print lingtai.__file__, whether the install is editable, and the distribution metadata. Then capture the git HEAD of the imported checkout to confirm it matches the intended commit.

Why does a merged fix not take effect after a refresh?

Refresh reloads from the configured runtime environment but does not fetch or fast-forward source trees. The agent may import a different checkout, carry a polluted PYTHONPATH, or keep a long-lived service object that was never rebuilt — verify the runtime object, not just the source on disk.

How do I verify a TUI rebuild actually landed on PATH?

Compare readlink -f of the on-PATH lingtai-tui binary, its mtime, and the SHA in --version against your build output and repository HEAD. Homebrew symlinks often point into a different worktree, so all three must agree before trusting the binary.

Can a normal refresh fix PYTHONPATH pollution in a running agent?

No. The refresh watcher copies the parent environment verbatim, so a polluted PYTHONPATH survives refresh. The only fix is an identity-verified clean relaunch of the agent process with PYTHONPATH explicitly unset.

How do I report runtime diagnostics without leaking secrets?

Use the safe evidence pack format: report source paths, HEAD, binary version, and module origins while replacing tokens and keys with <REDACTED>, generalizing private paths, and stating 'uses env reference' instead of echoing values.