[PR #6345] [MERGED] fix(environment): preserve UUID renewal ownership #7293

Closed
opened 2026-11-01 21:46:49 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6345
Author: @gensokyo-dev
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @gensokyo-dev

Base: main ← Head: fix/environment-renewal-relations-20261022


📝 Commits (1)

  • 65ac765 fix(environment): preserve UUID renewal ownership

📊 Changes

5 files changed (+179 additions, -41 deletions)

View changed files

📝 docs/specs/agent-environments/write-assigned-values/spec.md (+4 -0)
📝 src/application/environment/environmentStateAssignedCoverage.test.ts (+73 -0)
📝 src/domain/analysisView/environmentStateWriteExplain.test.ts (+62 -14)
📝 src/domain/analysisView/environmentStateWriteExplain.ts (+2 -4)
📝 src/domain/analysisView/environmentStateWriteGenerated.ts (+38 -23)

📄 Description

Summary

Fixes #6343. Follow up two late #6136 review findings without modifying its merged history:

  • Own one case-insensitive nested renewal identity instead of separate raw/canonical maps; preserve source spelling in entities and serving.
  • Refuse renewal aliases to request values, prior identities, other entities or non-renewed output fields. Consistent nested-only shared generation remains supported.
  • Apply the same cross-field ownership constraint when another entity already holds a supposedly fresh scalar UUID.

The shared explanation owner produces these facts for both CLI/MCP; no new endpoint, cache, schema, target execution or remote write. Unsupported relations remain served:false, reason:unexplained-change with original Evidence accessible.

Evidence and validation

  • Four new capture→manifest→state→serving guards fail on base 957bcfa14 and pass with the fix: requested/held/request-only aliases and a repeated mixed-case nested identity. Three pre-existing integration guards remain green.
  • 763 related source tests passed, including added canonical identity and cross-owner reuse controls.
  • Exact head: complete static checks (all six tasks and architecture guards), 20 compiled CLI/MCP serving/schema boundary tests, docs check and test discovery passed. An intermediate readonly-array type error was corrected before successful validation/push.
  • Independent local Codex CLI source review found no definite new defect; it explicitly noted broader UUID scans and no persistent cache. That review did not execute tests or live apps.
  • Five immutable public capture datasets (Directus/Homebox/Mealie/Keycloak/Shlink) passed real compiled CLI/stdin MCP named output-schema validation and normalized-fact/Evidence parity, with source-byte SHA-256 checks. All ten manifest/state Evidence IDs and served-write verdicts are unchanged from main 957bcfa14. Complete source revision/digest metadata and outputs are retained locally; these are recordings, not live app writes.
  • Complete five-capture workflow: baseline 31.49 s wall / 47.83 s CPU / 1173 MiB sampled process-family RSS; candidate 26.34 s / 42.12 s / 1186 MiB. Each is a fresh process session; filesystem caches/host load were uncontrolled. Memory is a 500 ms sampling estimate, not an exact peak. No child processes survived. No speedup or cold-cache claim.
  • No live application/native provider/Windows qualification is claimed. Public recording checks do not establish live write fidelity. Token costs have not been compared; no context, speedup or token reduction claim.

Contract and boundary impact

Existing capture→state explanation and local serving only. Retained identity facts are normalized once; output fields, caller-selected values and Evidence provenance are unchanged. A previously falsely admitted alias is now withheld, while supported mixed-case renewals are admitted. No ambient credentials, application launch, mutation, installer or package changes.

Author readiness

Human owner: @gensokyo-dev

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

These declarations are not attested by the agent. The user explicitly requested ready PRs and authorized justified merge bypass; this does not establish human review.

Before merge

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/6345 **Author:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/22/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `fix/environment-renewal-relations-20261022` --- ### 📝 Commits (1) - [`65ac765`](https://github.com/morluto/rea/commit/65ac76557afe234093e493a184ad69dd678171e6) fix(environment): preserve UUID renewal ownership ### 📊 Changes **5 files changed** (+179 additions, -41 deletions) <details> <summary>View changed files</summary> 📝 `docs/specs/agent-environments/write-assigned-values/spec.md` (+4 -0) 📝 `src/application/environment/environmentStateAssignedCoverage.test.ts` (+73 -0) 📝 `src/domain/analysisView/environmentStateWriteExplain.test.ts` (+62 -14) 📝 `src/domain/analysisView/environmentStateWriteExplain.ts` (+2 -4) 📝 `src/domain/analysisView/environmentStateWriteGenerated.ts` (+38 -23) </details> ### 📄 Description ## Summary Fixes #6343. Follow up two late #6136 review findings without modifying its merged history: - Own one case-insensitive nested renewal identity instead of separate raw/canonical maps; preserve source spelling in entities and serving. - Refuse renewal aliases to request values, prior identities, other entities or non-renewed output fields. Consistent nested-only shared generation remains supported. - Apply the same cross-field ownership constraint when another entity already holds a supposedly fresh scalar UUID. The shared explanation owner produces these facts for both CLI/MCP; no new endpoint, cache, schema, target execution or remote write. Unsupported relations remain `served:false`, `reason:unexplained-change` with original Evidence accessible. ## Evidence and validation - Four new capture→manifest→state→serving guards fail on base 957bcfa14 and pass with the fix: requested/held/request-only aliases and a repeated mixed-case nested identity. Three pre-existing integration guards remain green. - 763 related source tests passed, including added canonical identity and cross-owner reuse controls. - Exact head: complete static checks (all six tasks and architecture guards), 20 compiled CLI/MCP serving/schema boundary tests, docs check and test discovery passed. An intermediate readonly-array type error was corrected before successful validation/push. - Independent local Codex CLI source review found no definite new defect; it explicitly noted broader UUID scans and no persistent cache. That review did not execute tests or live apps. - Five immutable public capture datasets (Directus/Homebox/Mealie/Keycloak/Shlink) passed real compiled CLI/stdin MCP named output-schema validation and normalized-fact/Evidence parity, with source-byte SHA-256 checks. All ten manifest/state Evidence IDs and served-write verdicts are unchanged from main 957bcfa14. Complete source revision/digest metadata and outputs are retained locally; these are recordings, not live app writes. - Complete five-capture workflow: baseline 31.49 s wall / 47.83 s CPU / 1173 MiB sampled process-family RSS; candidate 26.34 s / 42.12 s / 1186 MiB. Each is a fresh process session; filesystem caches/host load were uncontrolled. Memory is a 500 ms sampling estimate, not an exact peak. No child processes survived. No speedup or cold-cache claim. - No live application/native provider/Windows qualification is claimed. Public recording checks do not establish live write fidelity. Token costs have not been compared; no context, speedup or token reduction claim. ## Contract and boundary impact Existing capture→state explanation and local serving only. Retained identity facts are normalized once; output fields, caller-selected values and Evidence provenance are unchanged. A previously falsely admitted alias is now withheld, while supported mixed-case renewals are admitted. No ambient credentials, application launch, mutation, installer or package changes. ## Author readiness Human owner: @gensokyo-dev - [ ] I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work. - [ ] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [ ] I declare this PR ready for initial maintainer review. These declarations are not attested by the agent. The user explicitly requested ready PRs and authorized justified merge bypass; this does not establish human review. ## Before merge - [x] This PR addresses a concrete problem or an agreed enhancement. - [x] Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff. - [x] The PR has one focused outcome and the title follows `type(scope): outcome`. - [x] Related issue is linked, or the reason for not linking one is stated above. - [x] Tests cover changed observable behavior and meaningful failure paths. - [x] Owning docs, contracts, and generated metadata are updated where needed. - [x] User-visible CLI/MCP changes include representative output. - [x] I checked the final diff for secrets, unrelated cleanup, and unsupported claims. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:46:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#7293
No description provided.