Skip to content

fix(core): dedup session.prs on parse + dedup writes + cleanup migration for indexed enrichment keys#2109

Merged
AgentWrapper merged 4 commits into
mainfrom
fix/dedup-session-prs-storage
Jun 8, 2026
Merged

fix(core): dedup session.prs on parse + dedup writes + cleanup migration for indexed enrichment keys#2109
AgentWrapper merged 4 commits into
mainfrom
fix/dedup-session-prs-storage

Conversation

@AgentWrapper
Copy link
Copy Markdown
Owner

Summary

  • Deduplicate session.prs by owner/repo/number when rehydrating metadata.
  • Deduplicate PR writes in lifecycle polling and use unique PR arrays for indexed enrichment/review metadata.
  • Add startup cleanup for existing duplicated prs CSV data and stale prEnrichment_N / prReviewComments_N keys with a metadata.deduplicated activity event.

Tests

  • pnpm --filter @aoagents/ao-core test
  • pnpm typecheck (note: first run before pnpm build failed because tracker-gitlab could not resolve @aoagents/ao-plugin-scm-gitlab/glab-utils from missing dist; passed after build generated dist)
  • pnpm lint (passes with existing warnings)
  • pnpm build
  • PORT=3100 DIRECT_TERMINAL_PORT=14901 pnpm dev + curl -I http://localhost:3100 -> 200 OK (default ports 3000/14801 were already in use)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 7, 2026

Test Coverage Report

Metric Value
Lines covered 2137/2341
Lines not covered 204/2341
Overall coverage 91.3%
Per-file breakdown
File Coverage
packages/core/src/lifecycle-manager.ts 918/1001 (91.7%)
packages/core/src/session-manager.ts 1153/1269 (90.8%)
packages/core/src/utils/pr.ts 48/51 (94.1%)
packages/core/src/utils/session-from-metadata.ts 18/20 (90.0%)

Uncovered lines

  • packages/core/src/lifecycle-manager.ts: L101, L105, L107, L154, L173, L200, L214, L277, L364, L366, L618-L619, L629, L635-L636, L652, L665-L666, L840-L842, L874, L896, L910, L955, L1028, L1116-L1117, L1121, L1124-L1125, L1128, L1194, L1212-L1213, L1229-L1230, L1430-L1433, L1448, L1480, L1626-L1628, L1740, L1779-L1780, L1794-L1795, L1803, L1812, L1924, L1963, L1992-L1993, L1996, L2001, L2007, L2128-L2130, L2165-L2167, L2271, L2313-L2314, L2375-L2376, L2387, L2390, L2473-L2475, L3020, L3145, L3150, L3156, L3161, L3192, L3202
  • packages/core/src/session-manager.ts: L308, L317-L318, L323-L324, L326, L339, L450, L514-L515, L517, L664, L729, L800-L802, L929-L930, L933, L1018, L1097, L1101, L1103, L1131, L1203-L1205, L1336, L1392, L1471, L1592, L1596-L1597, L1717, L1849, L1862-L1863, L1871, L1884-L1885, L1908, L1921-L1922, L1948, L2075, L2079-L2080, L2137, L2143, L2154, L2181, L2186, L2198, L2213-L2214, L2221, L2240, L2252, L2277, L2406, L2509-L2511, L2582, L2678, L2704-L2705, L2761-L2762, L2766, L2804-L2805, L2817-L2818, L2822, L2834, L2886, L2891, L2898, L2907, L2931, L2940, L2971, L2981, L2987, L3012, L3045, L3067, L3074, L3080, L3092, L3143, L3145-L3147, L3149, L3152-L3155, L3157-L3158, L3160, L3190, L3199, L3207, L3240, L3267, L3312, L3316, L3340, L3425, L3428, L3485, L3515, L3612
  • packages/core/src/utils/pr.ts: L49, L68, L107
  • packages/core/src/utils/session-from-metadata.ts: L31, L38

@AgentWrapper AgentWrapper merged commit 5897b4e into main Jun 8, 2026
12 checks passed
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