Title: fix(aggregator): isOrchestrationSection validates only the top level — a malformed goal crashes /today instead of falling back · Issue #949 · developing-today/code · GitHub
Open Graph Title: fix(aggregator): isOrchestrationSection validates only the top level — a malformed goal crashes /today instead of falling back · Issue #949 · developing-today/code
X Title: fix(aggregator): isOrchestrationSection validates only the top level — a malformed goal crashes /today instead of falling back · Issue #949 · developing-today/code
Description: Finding isOrchestrationSection validates only the orchestration section's top level, but the today-view consumer dereferences nested per-goal arrays unconditionally. A section that passes the validator can still crash /today and /api/tod...
Open Graph Description: Finding isOrchestrationSection validates only the orchestration section's top level, but the today-view consumer dereferences nested per-goal arrays unconditionally. A section that passes the valid...
X Description: Finding isOrchestrationSection validates only the orchestration section's top level, but the today-view consumer dereferences nested per-goal arrays unconditionally. A section that passes the v...
Opengraph URL: https://github.com/developing-today/code/issues/949
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fix(aggregator): isOrchestrationSection validates only the top level — a malformed goal crashes /today instead of falling back","articleBody":"## Finding\n\n`isOrchestrationSection` validates only the orchestration section's top level, but the today-view consumer dereferences nested per-goal arrays unconditionally. A section that **passes** the validator can still crash `/today` and `/api/today.json` with a `TypeError` instead of falling back to the locally derived view.\n\n## Evidence\n\n- PR #900 (commit `92d17e356135`) added the validator at `pm-stack/aggregator/src/feed.ts:38` (current main `a2eef6f7920a`). It checks only `version`/`generatedAt`/`runId`, that `tiers.needsDrew`/`tiers.needsOrchestrator` are arrays, and that `dependencies`/`goals`/`actions` are arrays. It never checks `provenance`, nor any per-goal field, nor tier-item fields.\n- PR #901's `todayFromSection` (current main `pm-stack/aggregator/src/derive.ts`) dereferences the unvalidated fields: `g.linedUp.filter(...)` (:595), `g.stalled.filter` and `g.linedUp.flatMap` (:614-615), `...g.gaps` (:622), `g.progressedSinceLastRun` (:618), `section.actions.slice` (:630).\n- Reproduced against current main with a section whose single goal omits `linedUp`: `isOrchestrationSection(s) === true`, then `todayFromSection(s)` throws `TypeError: undefined is not an object (evaluating 'g.linedUp.filter')`.\n- PR #900's own tests (`pm-stack/aggregator/test/orchestration.test.ts:50,56`) only reject a wrong version / missing top-level tier arrays — no nested-shape case exists.\n\n## Why it matters\n\nThe section is produced by an LLM-run orchestration job writing JSON by hand — exactly the producer a structural check exists to fail-soft against. The validator's documented contract (feed.ts comment: \"Absent or malformed = 'not measured'\") promises the derived fallback; instead, one malformed goal takes down the today view with a 500, which is the aggregator's headline page.\n\n## Acceptance criteria\n\n- The validator rejects (or the consumer tolerates) a goal missing any of `linedUp`/`stalled`/`gaps`/`progressedSinceLastRun`, and a section missing `provenance`.\n- Regression tests mirror `orchestration.test.ts` for the nested cases (goal missing each array in turn).\n- For such a feed, `/today` and `/api/today.json` return the locally derived view, not an error.\n\nFound by the pr-diff-review job reviewing PRs #900 and #901 against current main (one finding covering both PRs: #900 introduced the validator, #901 the consumer). Dedupe: searches for `isOrchestrationSection` / `orchestration linedUp validator` returned only the closed implementation issue #899.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-26T04:48:12Z","url":"https://github.com/developing-today/code/issues/949"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:6982ac2e-e702-23f5-ee29-8665583802de |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B548:F286:AEE8A1:E2D0E5:6B063942 |
| html-safe-nonce | 834b5db41cc5ea984003ecd002f171848927d1fabf849706da4f5e809c7dea87 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTQ4OkYyODY6QUVFOEExOkUyRDBFNTo2QjA2Mzk0MiIsInZpc2l0b3JfaWQiOiI4MzIxMjM1NzQwMzM2MjA4MTk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c65817c5ec01e7f6def9058312d3a317e62681436c031e42898b8f21f04857f0 |
| hovercard-subject-tag | issue:6033541211 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/949/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3bef2df7a9eccd1fbc36cf4f270e33c261cf68444bd055a8705638c1a79fce05/developing-today/code/issues/949 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3bef2df7a9eccd1fbc36cf4f270e33c261cf68444bd055a8705638c1a79fce05/developing-today/code/issues/949 |
| og:image:alt | Finding isOrchestrationSection validates only the orchestration section's top level, but the today-view consumer dereferences nested per-goal arrays unconditionally. A section that passes the valid... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | dcf72c457c022486d23c3cbb0dd21aba537a87611ca9ddabd1799cf2eaa9b297 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 0f38f5735226749ec5e08a8649dce4cb2613d9ad |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width