Skip to content

Update/epcis v2#34

Merged
MilanKomsa merged 26 commits into
mainfrom
update/epcis-v2
Feb 26, 2026
Merged

Update/epcis v2#34
MilanKomsa merged 26 commits into
mainfrom
update/epcis-v2

Conversation

@MilanKomsa

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread packages/plugin-epcis/src/index.ts Fixed
@MilanKomsa

Copy link
Copy Markdown
Contributor Author

@zsculac New commits look good, maybe just add to readme somewhere that publisher_url needs to be setup?

@MilanKomsa MilanKomsa requested a review from zsculac February 22, 2026 19:35
Zvonimir and others added 9 commits February 24, 2026 14:58
Adds OpenAI Codex-powered code review that runs on every PR and posts
inline comments like a human reviewer. Uses structured output schema
for reliable parsing and GitHub Review API for native inline comments.

- .codex/review-prompt.md: Two-pass review (blockers then maintainability)
  with comment gate, deduplication, and uncertainty guard
- .codex/review-schema.json: Strict output schema (additionalProperties: false)
- .github/workflows/codex-review.yml: SHA-pinned actions, fork PR guard,
  paginated file listing, null-patch handling, overflow comments in summary

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If Codex returns empty or non-JSON output, the workflow now posts a
warning comment with a link to the logs instead of silently failing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tput

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR adds substantial EPCIS query/asset functionality and improves responses, but there are two blockers: the new GROUP_CONCAT query drops epcList when filtering by EPC, and the new user-facing routes/params have no tests. There are also schema/validation mismatches (OpenAPI response missing requestId, handler-side validation, and missing MCP input constraints) that should be cleaned up to stay consistent with project conventions. Overall the direction is good, but these correctness and test gaps need to be addressed first.

return `${PREFIXES}
SELECT ?ual ?eventType ?eventTime ?epc ?bizStep ?disposition ?readPoint ?bizLocation
SELECT ?ual ?eventType ?eventTime ?bizStep ?bizLocation ?disposition ?readPoint ?action ?parentID
(GROUP_CONCAT(DISTINCT ?epc; SEPARATOR=", ") AS ?epcList)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Bug: ?epc is only bound when no epc filter is provided, so when callers filter by epc the GROUP_CONCAT(DISTINCT ?epc …) yields an empty epcList. Bind ?epc regardless of filters (e.g., always add OPTIONAL { ?event epcis:epcList ?epc . } and keep the filter separate) or change the SELECT to use a variable that’s always bound.

Comment thread packages/plugin-epcis/src/index.ts Outdated
Comment thread packages/plugin-epcis/src/index.ts Outdated
Comment thread packages/plugin-epcis/src/index.ts
Comment thread packages/plugin-epcis/src/index.ts Outdated
Comment thread packages/plugin-epcis/src/index.ts Fixed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two blockers: the publisher endpoint now depends on a frontend env var and the /epcis/events route introduces a breaking requirement for at least one filter. The refactor otherwise improves structure (shared validation/services and richer tests), but there are a couple of spec/test pattern drifts that should be cleaned up. Maintainability overall improves in the EPCIS plugin, though the OpenAPI schema mismatch and test import patterns slightly erode consistency.

Additional comments

These comments target lines outside the diff and could not be posted inline.

  • apps/agent/tests/unit/thinkingIndicatorVisibility.spec.ts:5 — 🟡 Issue: This test imports from src, which violates the repo rule to test against dist artifacts. Consider exporting thinkingIndicator from the built output or relocating the test to align with the guideline.

Comment thread packages/plugin-epcis/src/services/epcisPublisherService.ts
Comment thread packages/plugin-epcis/src/index.ts
Comment thread packages/plugin-epcis/src/index.ts
Comment thread packages/plugin-epcis/tests/pluginEpcis.spec.ts Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is largely clean and adds helpful validation/refactoring plus thorough EPCIS tests, but there are a few maintainability/compatibility issues to address. The biggest risks are the new hard dependency on EXPO_PUBLIC_MCP_URL for publisher calls and a test importing from src/ instead of dist/, which can mask build-time regressions. Maintainability in the EPCIS plugin is improved overall (clearer helpers and parity tests), while the chat UI changes are neutral aside from a small typing/test-structure cleanup.

Additional comments

These comments target lines outside the diff and could not be posted inline.

  • apps/agent/src/components/Chat/Messages.tsx:65 — 🟡 Issue: React.MutableRefObject is referenced without importing React (or the type), which will fail check-types under the new JSX transform. Import type { MutableRefObject } from react (or use RefObject) and cast to that instead of React.*.
  • apps/agent/tests/unit/thinkingIndicatorVisibility.spec.ts:20 — 🟡 Issue: This new unit test doesn’t follow the required Core Functionality and Error Handling describe blocks used elsewhere in apps/agent/tests/unit. Please split these cases into those sections to match the testing convention.

Comment thread packages/plugin-epcis/tests/pluginEpcis.spec.ts Outdated
Comment thread packages/plugin-epcis/src/services/epcisPublisherService.ts

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 There is a correctness issue in the new SPARQL query: the grouping can collapse multiple events into a single row, which will undercount and merge results. Everything else looks directionally solid, with good validation and expanded tests/docs. Maintainability is generally improved via shared helpers and clearer error handling, though the stricter publisher endpoint config handling could be disruptive if existing deployments relied on the old fallback.


// Assemble the query with GROUP_CONCAT for array fields
return `${PREFIXES}
SELECT ?ual ?eventType ?eventTime ?bizStep ?bizLocation ?disposition ?readPoint ?action ?parentID

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Bug: This query groups without ?event, so distinct events with the same type/time/location/etc. will be merged by GROUP_CONCAT, losing rows and undercounting results. Include ?event in the SELECT/GROUP BY (and strip it from API responses if you don’t want to expose it) to preserve one row per event.

Comment thread packages/plugin-epcis/src/services/epcisPublisherService.ts
@MilanKomsa MilanKomsa merged commit 1ad8c16 into main Feb 26, 2026
10 checks passed
@zsculac zsculac deleted the update/epcis-v2 branch February 27, 2026 08:03
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.

3 participants