Skip to content

fix(pi): expose owning Taskflow run identity to children - #173

Merged
heggria merged 3 commits into
mainfrom
fix/pi-run-identity-172
Oct 7, 2026
Merged

heggria merged 3 commits into
mainfrom
fix/pi-run-identity-172

Conversation

@heggria

@heggria heggria commented Sep 30, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes #172.

  • Add optional RunOptions.runId and populate it from the owning state in the imperative path and both event-kernel call builders.
  • Export it as PI_SUBAGENT_RUN_ID in Pi children, replacing a stale inherited Pi marker without mutating the parent environment.
  • Preserve direct-call behavior when no run ID is supplied, existing DEVLOOPS_RUN_ID ownership, child isolation, and other host adapters.
  • Add 17 regression tests covering seven agent-call phase families in both engines, nested owning identities, flow/phase/argument decoys, and the actual child environment.

Verification

  • Reproduced six failing identity assertions before the patch using the actual Taskflow store/runtime/Pi runner and spawned local probe processes.
  • Full workspace unit suite: 2,418 passed, 0 failed.
  • pnpm run typecheck: passed.
  • pnpm run build: passed.
  • Real-process integration harness with unmodified current dev-loops async-start guard: 13 passed.
  • Independent process checks against current and filing-time dev-loops guards: 9 passed.
  • git diff --check: passed.

Tests ran on Linux with Node 24.19.0 and pnpm 11.19.0. A writable isolated HOME was used for workspace-control storage. Integration probes replaced only the Pi CLI executable; no live Pi/model end-to-end execution or external GitHub workflow was performed locally.

Independent main landing (2026-10-07)

This fix targets main directly and does not depend on release PR #142 or the dependency upgrades in #174.

Scanner diagnosis and minimal adjustment

  • Re-scanned current main 48a5ea3 and the run-identity tree with the same plugin-scanner 2.0.1116 / cisco-ai-skill-scanner 2.0.14, balanced policy, and completed static/bytecode/pipeline coverage. Both scored 78/100; the complete finding lists were identical.
  • The diagnostic exact-head scan exposes both highs as UNICODE_OBFUSCATED_INSTRUCTION, in packages/codex-taskflow/plugin/skills/taskflow/SKILL.md:3 and configuration.md:1. Both documents were byte-identical to main.
  • Inspected the installed 2.0.14 rule: ordinary ellipses trigger NFKC normalization, while an unrelated document-wide regex matches text such as "Read-only ... zero tokens". Its location is the first non-ASCII line, not a malicious payload location. These are reproducible documentation false positives, not run-identity defects.
  • Cisco 2.0.12 used by fix(ci): consolidate dependency upgrades and retain deep scans #174 does not contain this rule. Its green scan is therefore not evidence that these findings were remediated.
  • Normalize only typographic ellipses (… to ...) in skills-src/taskflow/core.md and configuration.md, then regenerate the six host copies. No instructions, permissions, runtime behavior, scanner versions, rules, thresholds, or suppression baselines changed.
  • Keep full JSON findings visible in CI, including failures.

Verification for final head

Head: f6094917507b79e0d1a610a08d03f0a035924d66.

  • Local run-identity regressions: 17/17 passed, including real child-process environment capture.
  • Skill build/drift/host filtering tests: 3/3 passed; build-skills --check and git diff --check passed.
  • Final local scan on the unchanged scanner versions: 81/100, critical 0, high 0, medium 5, low 9, info 5. Cisco skill scanning completed with balanced static/bytecode/pipeline coverage. Optional Cisco MCP scanning remains unavailable, as before.
  • Remote full CI and Plugin Security Scan both passed on this exact head. All 10 CI jobs succeeded, including Node 22/24 typechecks and full unit suites, three-OS process supervision, package builds/consumers, MCP E2E, website export, and CodeQL. The remote scan confirmed 81/100, critical 0, high 0, unchanged scanner/Cisco versions, completed balanced static/bytecode/pipeline coverage, and zero skipped targets.

The pre-adjustment diagnostic head 623a21d also passed all 10 CI jobs. Historical local verification above is retained as historical evidence, not claimed to have been rerun in full locally today.

Pass the persisted owning run ID through imperative and event-kernel runner options, then export it as PI_SUBAGENT_RUN_ID. Preserve direct-call behavior and downstream-owned environment variables. Add regression coverage for all agent-call families and nested flows.

Fixes #172.
The unchanged main and Pi run identity trees both report two Cisco
UNICODE_OBFUSCATED_INSTRUCTION highs. Cisco 2.0.14 combines NFKC
changes from ordinary ellipses with unrelated read/tokens prose.
Use equivalent ASCII ellipses in the two skill sources and regenerate.
Keep the existing scanner, rules, coverage, and security thresholds.
@heggria
heggria marked this pull request as ready for review October 7, 2026 14:06
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 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-07T14:09:51.397930Z f609491 Draft marked ready
ℹ️ 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.

@heggria
heggria merged commit 95763fd into main Oct 7, 2026
12 checks passed
@heggria
heggria deleted the fix/pi-run-identity-172 branch October 7, 2026 14:08
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.

fix(pi): expose Taskflow run identity to child agents

1 participant