Skip to content

Comments

fix: add missing createdOnPlatform for security-agent and app-builder#383

Merged
pedroheyerdahl merged 4 commits intomainfrom
fix/missing-usage-feat-tracking
Feb 20, 2026
Merged

fix: add missing createdOnPlatform for security-agent and app-builder#383
pedroheyerdahl merged 4 commits intomainfrom
fix/missing-usage-feat-tracking

Conversation

@pedroheyerdahl
Copy link
Contributor

Follow-up to #307 (microdollar feature tracking).

Problem

Two code paths were spawning cloud-agent sessions without passing createdOnPlatform, causing their LLM usage to be attributed as cloud-agent instead of the correct feature.

Changes

Security Agent sandbox analysis (src/lib/security-agent/services/analysis-service.ts)

  • Added createdOnPlatform: 'security-agent' to the initiateSessionStream call
  • Extended existing test to assert the field is passed

App Builder legacy session backfill (src/lib/app-builder/app-builder-service.ts)

  • Added createdOnPlatform: 'app-builder' to the prepareLegacySession call

Plan docs (plans/microdollar-feature-tracking.md)

  • Rewrote implementation steps to reflect actual state
  • Added remaining work items (CLI release + version bump needed)

Testing

  • pnpm typecheck passes
  • pnpm test -- src/lib/security-agent/services/analysis-service.test.ts passes (asserts createdOnPlatform: 'security-agent' in the mock call)

…d security-agent sessions

Pass createdOnPlatform to session creation calls so sandbox LLM
requests are attributed to the correct feature:

- app-builder: set 'app-builder' in prepareLegacySession
- security-agent: set 'security-agent' in startSecurityAnalysis
- Update analysis-service test to assert createdOnPlatform

Refresh feature tracking plan to reflect normalized recent changes and status
@kiloconnect
Copy link
Contributor

kiloconnect bot commented Feb 19, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds missing createdOnPlatform fields to two call sites and updates the feature-tracking plan document to reflect the current implementation state.

Code changes:

  • app-builder-service.ts: Adds createdOnPlatform: 'app-builder' to the prepareLegacySession call in prepareLegacySession(). This was already present in the other two app-builder call sites (lines 121, 515) but was missing from this one — a clear oversight now fixed.
  • analysis-service.ts: Adds createdOnPlatform: 'security-agent' to the initiateSessionStream call in startSecurityAnalysis(), ensuring security agent sandbox sessions are properly attributed.
  • analysis-service.test.ts: Adds a corresponding test assertion for the new createdOnPlatform field.

Documentation: The plan document (plans/microdollar-feature-tracking.md) is updated to reflect the current state of implementation, replacing speculative steps with descriptions of what's actually been built and noting remaining work items.

Files Reviewed (4 files)
  • plans/microdollar-feature-tracking.md - documentation update
  • src/lib/app-builder/app-builder-service.ts - 0 issues
  • src/lib/security-agent/services/analysis-service.ts - 0 issues
  • src/lib/security-agent/services/analysis-service.test.ts - 0 issues

@pedroheyerdahl pedroheyerdahl merged commit 2196450 into main Feb 20, 2026
12 checks passed
@pedroheyerdahl pedroheyerdahl deleted the fix/missing-usage-feat-tracking branch February 20, 2026 17:29
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