Skip to content

feat(remote_agent): log planner motif telemetry with adjacency drafts#73

Open
PiyushDatta wants to merge 1 commit intomainfrom
agent/workerpal-4b26ed42/6d34b614-77a0-49c6-9e31-1982e5581bf6
Open

feat(remote_agent): log planner motif telemetry with adjacency drafts#73
PiyushDatta wants to merge 1 commit intomainfrom
agent/workerpal-4b26ed42/6d34b614-77a0-49c6-9e31-1982e5581bf6

Conversation

@PiyushDatta
Copy link
Copy Markdown
Collaborator

Summary

  • Apply WorkerPal completion 6d34b614-77a0-49c6-9e31-1982e5581bf6 to main_agents.
  • Integrate commit 61977dec2c48fa46c56a62aa6d1c9fca9b9b4d4c from refs/pushpals/agent/workerpal-4b26ed42/6d34b614-77a0-49c6-9e31-1982e5581bf6.
  • Worker workerpal-4b26ed42 reported: Executed task and modified 1 file(s) (quality gate soft-pass after 4 auto-revision attempt(s))
  • Canonical task request: In apps/remotebuddy/src/autonomous_engine.ts, teach the planner to recombine startup-stability and merge-hardening motifs into adjacency-ranked objective drafts before worker dispatch, and log the motif mix plus current queue context i...

Motivation / Context

  • Preserve and review autonomous worker output before final merge to base branch.
  • Keep integration branch current with queued worker completions.

Planned Scope

  • apps/remotebuddy/src/autonomous_engine.ts

Planned Validation

  • Planned: bun run test:root

Changes

  • Updated apps/remotebuddy/src/autonomous_engine.ts

Testing / Validation

  • Planned: bun run test:root
  • Worker completion summary did not include explicit command pass/fail output.

Impact / Risk

  • Risk level: medium (automated worker-generated change; maintainer review required).
  • No secrets or credentials are expected in this PR body.

SourceControlManager Note

  • Use this worker-provided PR title/body when creating the integration PR.
  • Suggested title: fix(repo): In apps/remotebuddy/src/autonomous_engine.ts, teach the planner to recombine startup-stabil...

Checklist

  • Tests added/updated where appropriate

  • Validation commands run (or noted as not run)

  • Docs/comments updated if needed

  • No sensitive data (secrets/tokens) committed

  • Agent branch: agent/workerpal-4b26ed42/6d34b614-77a0-49c6-9e31-1982e5581bf6

  • Completion ref: refs/pushpals/agent/workerpal-4b26ed42/6d34b614-77a0-49c6-9e31-1982e5581bf6

  • Commit: 61977dec2c48fa46c56a62aa6d1c9fca9b9b4d4c

  • Completion ID: 9fb5eb58-b422-4984-b7df-d252abdce75e

- define QueueContextTelemetry/MotifAdjacencyDraft plumbing and logPlannerMotifTelemetry() for motif mix reporting
- add merge_hardening entry to COMMIT_MOTIF_RULES with apps/server component targeting
- implement overlapCoefficient(), summarizeQueueContext(), buildPlannerInputArtifacts(), and summarizePlannerTelemetryForEvidence() to blend startup and merge motifs
- update RemoteBuddyAutonomousEngine.tick to emit planner telemetry stages and persist plannerEvidence in postObjective()
- add vitest coverage for buildPlannerInputArtifacts rankings and logPlannerMotifTelemetry logging output

Tests:
- bun run test:root
@PiyushDatta
Copy link
Copy Markdown
Collaborator Author

ReviewAgent: Changes Approved (score 8.3/10)

Verdict: The change is well-structured and mostly correct, but it lacks key negative-path validation and has a silent degradation path that can reduce planner quality without strong safeguards.
Threshold: 8.1/10
Why this passed: Score 8.3/10 is >= 8.1/10.

Potential Improvements:

  • Silent fallback in buildMotifAdjacencyDrafts when startup_stability or merge_hardening is missing returns empty drafts and only logs a warning; this can quietly drop planner enrichment and telemetry value without explicit downstream handling.
  • New tests cover happy paths but miss critical failure/edge behavior: no test for missing motif rules, no test for empty dispatch_budget/missing queue signals, and no test validating planning_failed telemetry emission from the catch path.
  • The new merge_hardening motif rule is hard-coded to apps/server paths from within remotebuddy planner logic, but there is no assertion or contract test ensuring this cross-component targeting is intentional and does not bias candidate planning in unrelated components.

This PR met the configured review threshold and is approved for automated merge.

@PiyushDatta
Copy link
Copy Markdown
Collaborator Author

ReviewAgent: Changes Rejected (score 7.8/10)

Verdict: The feature is well-structured and mostly correct, but it lacks end-to-end safeguards and coverage for key failure and integration paths.

Issues:

  • Missing integration tests around RemoteBuddyAutonomousEngine dispatch flow: there are no assertions that evidence (from summarizePlannerTelemetryForEvidence) is actually persisted in postObjective payloads for both dispatched and enqueue_failed branches, so the primary behavioral contract of this change is unverified.
  • Missing negative-path tests for adjacency draft construction: buildMotifAdjacencyDrafts can return [] when motif rules are absent, but there is no test validating planner behavior with empty adjacency_objective_drafts (including ensuring planning input remains accepted and telemetry logging remains stable).
  • Potential cross-domain regression risk in COMMIT_MOTIF_RULES: new merge_hardening rule is hardcoded to apps/server/apps/server/src/autonomy.ts, while this change is in apps/remotebuddy; without tests validating candidate-selection impact, this can unintentionally skew motif-driven planning toward unrelated components.
  • Telemetry stage coverage is incomplete in tests: logPlannerMotifTelemetry is tested only for dispatched and enqueue_failed, but not for planning_start, lock-failure stages, planning_snapshot_expired, and catch-driven planning_failed, leaving stage-specific logging behavior unverified.

This PR has been re-queued for automated fixes. A worker will address the issues above.

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.

1 participant