Repository navigation
fix(javascript): preserve workflow evidence subjects - #9483
ShuaixinHuang wants to merge 1 commit into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The change reaches two JavaScript trace workflows. The shared subject conversion must preserve architecture and satisfy the repository’s ownership rule before merging. Findings
Fix with agent prompt### Issue 1
src/application/javascript/JavaScriptApplicationWorkflowService.ts:135-141
Both trace services rebuild the source subject independently and omit `architecture`. `ManagedApplicationGraphService` preserves that field for PE subjects, and feature traces accept those managed graphs. This conversion then turns the known architecture into `null`, even though it is part of `evidenceSubjectIdentity`.
Move the conversion to one shared owner and preserve every subject identity field. The repeated conversion also violates the repository directive to “Normalize once at the owning boundary”; that requirement must be satisfied before merging. Add a test with a non-null architecture, since the updated directory fixtures do not catch this loss.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThe PR passes the source application subject into Evidence created by both trace workflows.
Reviews (2) · Last reviewed commit: "fix(javascript): preserve workflow evide..." · Reviewed by Greptile |
| source.evidence.subject === null | ||
| ? undefined | ||
| : { | ||
| path: source.evidence.subject.local_path, | ||
| sha256: source.evidence.subject.digest.sha256, | ||
| format: source.evidence.subject.format, | ||
| }, |
There was a problem hiding this comment.
Traces lose known architecture
Both trace services rebuild the source subject independently and omit architecture. ManagedApplicationGraphService preserves that field for PE subjects, and feature traces accept those managed graphs. This conversion then turns the known architecture into null, even though it is part of evidenceSubjectIdentity.
Move the conversion to one shared owner and preserve every subject identity field. The repeated conversion also violates the repository directive to “Normalize once at the owning boundary”; that requirement must be satisfied before merging. Add a test with a non-null architecture, since the updated directory fixtures do not catch this loss.
Context Used: AGENTS.md (source)
Knowledge Base Used: JavaScript and desktop reconstruction
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/application/javascript/JavaScriptApplicationWorkflowService.ts
Line: 135-141
Comment:
**Traces lose known architecture**
Both trace services rebuild the source subject independently and omit `architecture`. `ManagedApplicationGraphService` preserves that field for PE subjects, and feature traces accept those managed graphs. This conversion then turns the known architecture into `null`, even though it is part of `evidenceSubjectIdentity`.
Move the conversion to one shared owner and preserve every subject identity field. The repeated conversion also violates the repository directive to “Normalize once at the owning boundary”; that requirement must be satisfied before merging. Add a test with a non-null architecture, since the updated directory fixtures do not catch this loss.
**Context Used:** AGENTS.md ([source](https://github.com/morluto/rea/blob/main/AGENTS.md))
**Knowledge Base Used:** [JavaScript and desktop reconstruction](https://app.greptile.com/-/switch-tenant?tenant=pre&next=%2Fcustom-context%2Fknowledge-base%2Fmorluto%2Frea%2F-%2Fdocs%2Fjavascript-and-desktop-reconstruction.md)
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da344a10af
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| path: source.evidence.subject.local_path, | ||
| sha256: source.evidence.subject.digest.sha256, | ||
| format: source.evidence.subject.format, |
There was a problem hiding this comment.
Preserve the source architecture in feature-trace subjects
When trace_application_feature receives a project_managed_application_graph source, its PE subject can contain a known architecture that ManagedApplicationGraphService.ts deliberately preserves. This new projection drops that field, and createEvidence substitutes architecture: null. Architecture participates in evidenceSubjectIdentity and the artifact manifest produced by createEvidenceBundle, so exporting the trace alongside its retained source now produces two distinct artifact declarations for the same PE digest instead of preserving the source identity. Carry the architecture through the subject conversion and cover an architecture-bearing managed graph in the regression test.
AGENTS.md reference: AGENTS.md:L19-L19
Useful? React with 👍 / 👎.
|
Thank you for identifying the missing trace Evidence subject. We have incorporated the fix into #9492 with attribution, together with the related feature-view integrity and full subject metadata handling, so I am closing this PR as superseded. We appreciate the report and the contribution. |
Fixes #9480.
Summary
Preserve the verified application Evidence subject when creating derived Evidence for
trace_application_featureandtrace_javascript_semantics. This prevents valid artifact identity from being replaced with a null subject and a misleading unavailable-identity limitation.Validation
npm run test:focused -- src/application/javascript/JavaScriptEvidenceInputs.test.tsgit diff --check