Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .agents/pm/chores/pm-3mal.toon
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ status: open
priority: 2
tags[3]: perf,startup,telemetry
created_at: "2026-05-29T22:28:38.724Z"
updated_at: "2026-05-30T05:07:04.484Z"
assignee: maintainer-agent
updated_at: "2026-05-30T06:42:12.568Z"
author: maintainer-agent
comments[2]{created_at,author,text}:
comments[3]{created_at,author,text}:
"2026-05-29T22:59:24.881Z",maintainer-agent,"Addressed the highest-frequency sub-item: scheduleTelemetryFlush now spawns the detached flush child AT MOST ONCE per process (in-process guard). Previously command_start + command_finish each spawned a child (~6.5ms fork/exec each, deduped only by lock AFTER paying Node startup). One child drains the whole queue. DEFERRED with rationale: (a) PM_TOOL_PARAMETERS_SCHEMA lazy-build — it is public SDK surface (sdk/index.ts re-exports it, contract-tested in sdk-index.spec) and the eager build is only ~3ms (~1% of a ~300ms command); churning the public API for 1% is not worth it. (b) completion.ts flag-string constants are not on the bundled CLI hot path. The dominant per-command cost is ESM module-load/bundle, tracked separately under pm-ss1d (esbuild --splitting --packages=external). Keeping open for the bundling lever."
"2026-05-30T05:07:04.484Z",maintainer-agent,"CORRECTION: reverted the in-process flush spawn-once guard. A flush child boots (~50-100ms) before even a normal command finishes (~300ms), so spawning only at command_start would systematically defer the command_finish event to the next invocation — a real-time telemetry timeliness regression not worth ~6.5ms. The correct optimization is a cheap cross-process 'flush already in flight' check before spawn (skip redundant spawns while preserving timeliness), tracked as future work. No telemetry runtime change ships in this PR; pm-3mal stays open for the bundling lever (pm-ss1d) + the in-flight cross-process flush guard."
"2026-05-30T06:15:14.974Z",maintainer-agent,"Partial implementation evidence 2026-05-30: added the future-work cross-process telemetry flush spawn guard. scheduleTelemetryFlush now creates a cheap spawn-gate directory before forking, skips duplicate command_finish spawns while a command_start child is booting, also skips when a fresh flush.lock is already owned by another process, and clears the spawn gate once the child enters the process lock. This preserves real-time command_finish flushing without paying duplicate child process startup. Bundling lever remains open under this chore; not closing pm-3mal in this pass."
files[2]{path,scope,note}:
src/core/telemetry/runtime.ts,project,Cross-process telemetry flush spawn gate
tests/unit/telemetry-runtime.spec.ts,project,Telemetry spawn gate regression coverage
tests[1]{command,path,scope,timeout_seconds,pm_context_mode,env_set,env_clear,shared_host_safe,assert_stdout_contains,assert_stdout_regex,assert_stderr_contains,assert_stderr_regex,assert_stdout_min_lines,assert_json_field_equals,assert_json_field_gte,note}:
node scripts/run-tests.mjs test -- tests/unit/telemetry-runtime.spec.ts,null,project,300,null,null,null,null,null,null,null,null,null,null,null,Telemetry flush spawn gate regression
Comment on lines +9 to +19

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid direct edits under .agents/pm/**.

These tracker changes are direct modifications in a protected path; they should be produced through the pm system-of-record flow instead of manual file edits.

As per coding guidelines, .agents/pm/**: pm is the system of record. Do not edit .agents/pm files directly.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.agents/pm/chores/pm-3mal.toon around lines 9 - 19, You edited a protected
tracker under the pm system (pm-3mal) directly; revert those manual edits and
re-submit the change through the pm system-of-record flow instead. Undo the
direct changes made to the tracker metadata in the .agents/pm area, recreate the
intended changes as a normal code commit that updates the implementation in the
runtime telemetry code and tests (target the telemetry runtime change and its
test: symbols referencing scheduleTelemetryFlush / spawn gate logic and the
telemetry-runtime.spec tests), and open the change via the official pm workflow
(use the pm tool/CLI to create the tracker/pr) so the .agents/pm metadata is
produced by the system rather than manual edits. Ensure no further direct edits
are made under the protected .agents/pm namespace.

body: ""
5 changes: 3 additions & 2 deletions .agents/pm/epics/pm-th6y.toon
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ status: closed
priority: 2
tags[4]: perf,quality,sdk,session-2026-05-27
created_at: "2026-05-27T16:46:49.712Z"
updated_at: "2026-05-30T05:21:35.554Z"
updated_at: "2026-05-30T05:59:25.473Z"
author: maintainer-agent
resolution: "Implemented bundled startup path, agent-friendly get depth alias, package-source/install hardening, and regenerated changelog via pm-changelog."
expected_result: "pm CLI remains package-first, agent-friendly, fast, extensible, calendar/search capable, and green under full release gates."
actual_result: "Full release gate passed with 1979 tests at 100% coverage, required Sentry/telemetry gate ok, semantic temp-project dogfood ok, health ok, changelog check ok."
comments[22]{created_at,author,text}:
comments[23]{created_at,author,text}:
"2026-05-27T18:34:27.792Z",maintainer-agent,"Opened PR #77 (perf/cache-health-drift-startup): metadata body-split cache, skip-unchanged cache writes, onRead short-circuit, cached with-body path (removed dead listAllDocuments), drift verification cache (health 8.4s->1.3s), and advisory telemetry health warnings (ok:false fix). Closes pm-4r5t + pm-1lgy. All local gates green: 1852 tests, 100% coverage, typecheck, static/docs-skills, secrets, changelog. Awaiting CI + AI bot review."
"2026-05-27T19:08:33.696Z",maintainer-agent,"PR #77 merged to main (merge commit 3a85a060) after full green CI (build, compat/smokes/static/typecheck/coverage gates, runtime matrix macos+ubuntu Node 20/22/24) and AI bot review. Addressed CodeRabbit+Codex P2 findings in follow-up 42cfead6: drift-cache key now includes ctime_ms; --strict-exit help clarified (gates on ok, advisory telemetry excluded); onRead hook warnings surfaced. Sourcery was rate-limited (non-blocking). Shipped: pm list 401->310ms, pm health 8.4s->1.3s, health ok:true. Closed pm-4r5t + pm-1lgy; follow-ups pm-edge/xzrx/7ilo/1b96/fl0c remain open under this epic."
"2026-05-27T22:27:17.814Z",maintainer-agent,"Session 2026-05-28: opened branch feat/agent-ux-compact-output-and-mutation-guards to close two epic children as ONE coherent agent-UX + token-efficiency PR (the user's critical priority). Scope: pm-edge (create-type mistype guard; compact validate output via required_fields-only per-field ID arrays; dedupe search/list filters block to stop emitting projection.fields twice) + pm-fl0c (test --add inline-env wording; depends_on dep-kind alias->blocked_by; surface same-command nearest-flag did-you-mean in human output — verified MISSING on current build for 'pm create --titel'; plan materialize skip completed/already-materialized steps; close inline --resolution/--expected/--actual; scaffold uses install-safe typed extension shape). Deferred to follow-up PRs: pm-7ilo (model-agnostic search config), pm-xzrx (calendar), pm-1b96 (refactors), pm-ss1d (esbuild bundling). Three specialized sub-agents own disjoint file sets to avoid conflicts."
Expand All @@ -34,6 +34,7 @@ comments[22]{created_at,author,text}:
"2026-05-29T16:04:38.315Z",codex-audit-20260529,"CI follow-up evidence 2026-05-29: fetched release tags, regenerated CHANGELOG.md through pm-changelog so CI tag-aware static gate sees pm-th6y under Unreleased and pre-tag items under 2026.5.29. Hardened scripts/dogfood-package-first.mjs cleanup with retries/warn-only temp removal and explicit PM_TELEMETRY_SOURCE_CONTEXT=dogfood. Local Node 20 verification passed: pnpm changelog:pm:check, pnpm quality:static, pnpm smoke:npx, and pnpm dogfood:package-first."
"2026-05-29T16:09:22.065Z",codex-audit-20260529,"Final CI follow-up verification 2026-05-29: full local release gate re-run passed after the forward fix: build, typecheck, docs/skills, static quality, coverage 1979 tests at 100%, version policy, secret scan, npx smoke, package-first dogfood, npm-pack dry-run, compatibility, and required Sentry/telemetry gate. Sentry threshold remains critical=0 high=4; telemetry finish_error_rate_pct=1.36 and missing error-code rows=0."
"2026-05-30T05:21:35.554Z",maintainer-agent,"PR #83 (perf/cache-split-and-agent-ux) opened: closes pm-407c/pm-8c2s/pm-jd3v/pm-wr74/pm-7by2/pm-4d1b/pm-bpaj. Light/collections cache split, per-field semantic defaults + partial-settings hardening, executable command aliases (show->get, 312 telemetry events), type synonyms, calendar positional-date routing + impossible-date rejection, explicit semantic refresh contract. Full suite 2003 green + all gates. Awaiting CI + bot review."
"2026-05-30T05:59:25.473Z",maintainer-agent,"PR #83 MERGED to main 2026-05-30 (merge commit). All CI green across two review rounds (Build, 5 Gates, 4 runtime smokes, CodeRabbit, Sourcery, Docs). Round-1 bot feedback addressed: fixed real impossible-date guard gaps (compact-datetime/Z-suffixed dates), DRY centralization (HEAVY_METADATA_KEYS, findCommandTokenIndex), + test coverage. Closed: pm-407c/pm-8c2s/pm-jd3v/pm-wr74/pm-7by2/pm-4d1b/pm-bpaj. [Unreleased] populated -> daily auto-release will cut next version."
files[29]{path,scope,note}:
.agents/pm/extensions/.managed-extensions.json,project,Project pm-changelog managed package metadata refreshed
.agents/pm/extensions/pm-changelog/CHANGELOG.md,project,Project pm-changelog package refreshed to 2026.5.29-1
Expand Down
8 changes: 4 additions & 4 deletions .agents/pm/extensions/.managed-extensions.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"version": 1,
"updated_at": "2026-05-30T05:16:03.436Z",
"updated_at": "2026-05-30T06:49:38.327Z",
"entries": [
{
"name": "pm-changelog",
"directory": "pm-changelog",
"scope": "project",
"manifest_version": "2026.5.29-2",
"manifest_version": "2026.5.30",
"manifest_entry": "./dist/extension.js",
"capabilities": [
"commands",
"schema"
],
"installed_at": "2026-05-23T20:26:03.509Z",
"updated_at": "2026-05-30T05:15:49.204Z",
"updated_at": "2026-05-30T06:36:07.007Z",
"source": {
"kind": "npm",
"input": "npm:pm-changelog",
"location": "package",
"package": "pm-changelog",
"version": "2026.5.29-2"
"version": "2026.5.30"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion .agents/pm/extensions/pm-changelog/dist/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading