Skip to content

feat(parser): migrate positron provider#779

Draft
mariusvniekerk wants to merge 1 commit into
provider-copilot-idesfrom
provider-positron
Draft

feat(parser): migrate positron provider#779
mariusvniekerk wants to merge 1 commit into
provider-copilot-idesfrom
provider-positron

Conversation

@mariusvniekerk

Copy link
Copy Markdown
Collaborator

Positron now has a concrete parser provider for its workspaceStorage chat-session layout. The provider owns workspace chat discovery, raw and full ID lookup, recursive watch planning, changed-path classification including deleted chat paths and workspace.json fan-out, workspace metadata-aware freshness, hashing, project hints, and parse output through the existing Positron parser.

This keeps Positron on the shared provider interface while preserving its VS Code-style parser normalization and Positron-specific agent identity.

@roborev-ci

roborev-ci Bot commented Jun 19, 2026

Copy link
Copy Markdown

roborev: Combined Review (18e1d56)

Summary verdict: one medium correctness issue remains; no high or critical findings were reported.

Medium

  • internal/parser/positron_provider.go:105Parse drops parser-emitted usage events by building ParseResult with only Session and Messages, even though ParsePositronSession can populate sess.UsageEvents and the provider advertises AggregateUsageEvents support. Consumers that persist ParseResult.UsageEvents will silently lose Positron token/cost rows.
    • Fix: Set UsageEvents: sess.UsageEvents in the returned ParseResult and add a provider test fixture with usage metadata.

Panel: ci_default_security | Synthesis: codex, 6s | Members: codex_default (codex/default, done, 3m38s), codex_security (codex/security, done, 1m15s) | Total: 4m59s

@roborev-ci

roborev-ci Bot commented Jun 20, 2026

Copy link
Copy Markdown

roborev: Review Unavailable (2710ab5)

The review agent repeatedly failed to run (likely an agent or configuration error). roborev will try again on the next commit.

Last error: agent: claude-code failed stream: stream errors: You've hit your session limit · resets 5:50am (UTC): exit status 1

@roborev-ci

roborev-ci Bot commented Jun 21, 2026

Copy link
Copy Markdown

roborev: Combined Review (1c15a5f)

No issues found.


Panel: ci_default_security | Synthesis: codex | Members: codex_default (codex/default, done, 9m50s), codex_security (codex/security, done, 2m7s) | Total: 11m57s

@mariusvniekerk

mariusvniekerk commented Jun 21, 2026

Copy link
Copy Markdown
Collaborator Author

This change is part of the following stack:

Change managed by git-spice.

@roborev-ci

roborev-ci Bot commented Jun 21, 2026

Copy link
Copy Markdown

roborev: Combined Review (b8c0fb0)

Summary verdict: One medium issue remains; no high or critical findings were reported.

Medium

  • internal/parser/positron_provider.go:112, internal/sync/engine.go:6779ParsePositronSession populates sess.UsageEvents, and the provider advertises AggregateUsageEvents, but the provider result drops those events. The legacy processPositron path also omits them, so Positron sessions with VS Code-style token metadata will not write usage/cost rows.

    Fix: Set UsageEvents: sess.UsageEvents in both the provider ParseResult and processPositron, and add a fixture with result.metadata to assert usage events are preserved.


Panel: ci_default_security | Synthesis: codex, 9s | Members: codex_default (codex/default, done, 9m58s), codex_security (codex/security, done, 3m29s) | Total: 13m36s

@roborev-ci

roborev-ci Bot commented Jun 24, 2026

Copy link
Copy Markdown

roborev: Combined Review (d81b50f)

Summary verdict: No medium-or-higher severity findings to report.

Both reviews found no actionable issues at Medium, High, or Critical severity.


Panel: ci_default_security | Synthesis: codex, 5s | Members: codex_default (codex/default, done, 8m15s), codex_security (codex/security, done, 29s) | Total: 8m49s

Fold Positron onto a concrete provider-authoritative implementation and
delete the duplicated legacy parser path so there is a single source of
truth for its workspaceStorage-only layout and parse behavior. Discovery,
source lookup, and parse move onto the provider; the package-level
DiscoverPositronSessions, FindPositronSourceFile, and ParsePositronSession
free functions are removed and positron.go is deleted. The engine's
positron-specific dispatch, effective-mtime, and skip-cache blocks are
removed in favor of the provider Fingerprint, which folds workspace.json
size, mtime, and a chat+workspace composite hash into the source
fingerprint so a workspace-only project rename still re-syncs.

To keep that composite freshness once positron has no legacy mtime block,
the SyncAllSince mtime filter resolves provider-authoritative sources
through the provider Fingerprint (discoveredFileEffectiveMtime) instead of
the legacy per-agent mtime path. Codex is excluded from that path: its
Fingerprint folds the shared session_index.jsonl mtime into every session,
which is correct for the skip cache but defeats the per-copy mtime
discrimination the incremental-sync cutoff needs to preserve a changed
archived duplicate, so codex keeps its raw per-file mtime and the index
refresh stays handled separately by codexIndexRefresh. The OpenCode
incremental-sync test asserts the resulting composite freshness, where a
part-only edit advances the source mtime past the cutoff and re-syncs.
@roborev-ci

roborev-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

roborev: Combined Review (2a50a0f)

Summary verdict: changes need fixes for one high-severity test regression and one medium-severity usage persistence bug.

High

  • internal/parser/provider_shim_scan_test.go:64
    The pending shim list includes visualstudio_copilot_provider.go and vscode_copilot_provider.go, but the anti-shim test asserts pending files still reference a legacy entrypoint. These provider files are already folded, so the parser test will fail.
    Fix: Remove both provider files from pendingShimProviderFiles.

Medium

  • internal/parser/positron_provider.go:112
    parseVSCodeCopilotData populates sess.UsageEvents, and Positron advertises AggregateUsageEvents, but the provider drops those events from the returned ParseResult. Positron token usage rows will not be persisted.
    Fix: Return UsageEvents: sess.UsageEvents with the result, adjusting the event source to Positron if needed, and add coverage for token metadata.

Panel: ci_default_security | Synthesis: codex, 8s | Members: codex_default (codex/default, done, 5m32s), codex_security (codex/security, done, 2m53s) | Total: 8m33s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant