Repository navigation
#509: distinct uuid for listReducerToSpreadObject, guard against duplicate instance uuids - #606
Merged
miroir-framework merged 1 commit intoOct 30, 2026
Conversation
…icate instance uuids listReducerToSpreadObject shared uuid 8ddb7e2e-… with indexListBy, so uuid-keyed stores kept only one of them. It now takes the uuid of its file name, 0894ed4f-…. scripts/check_instance_uuids.py fails when two tracked instances of one Entity folder share a uuid; a pytest test runs it on the repository, so the pre-push gate and pr-checks enforce it. It also found a second duplicate: a copy of the Initial ApplicationVersion under a truncated file name, now removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BHqqe1gocM9Y9mjwK9YX3H
Contributor
[Medium impact] The PR appears safe to merge.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by A · project thread
Closes #509
What changes
listReducerToSpreadObjecttakes the uuid of its file name,0894ed4f-ca11-4b04-878d-471d1d780fac. It shared8ddb7e2e-…withindexListBy, so a uuid-keyed store kept only one of the two. No code refers to either definition by uuid (index.tsimports both by path), so no other reference changes.scripts/check_instance_uuids.py(npm run check:uuids). It fails when two tracked instances in one Entity folder of a deployment (packages/**/<entityUuid>/*.json) share a uuid. It skips folders of Entities whoseidAttributeis notuuid, and fails on a file that is not valid JSON. A pytest test runs it on the repository, so the existingpytest scripts/testsstep of the pre-push gate and ofpr-checks.ymlenforces it.miroir_modelVersion/c3f0facf…/695826c2-…-dee46fe21c1.jsonwas a copy of the Initial ApplicationVersion…dee46fe21c13.jsonunder a truncated file name, with only whitespace differences. The copy is removed andindex.tsimports…c13.json.MIROIR_VERSION_HISTORY_PARENTSdrops from 2 to 1 for that folder, since the filesystem store had returned the copy as a second row.Why a Python guard and not a modelValidation test: miroir-app-miroir's modelValidation builds its plan from
defaultMiroirMetaModel, which has no TransformerDefinition instances, and modelValidation runs only in nonreg. Details and the rejected options are incode-helpers/features/509-FIX-duplicate-transformer-definition-uuid/analysis.md. The TDD plan sits next to it.Postgres, IndexedDB and MongoDB stores seeded before this change hold one of the two definitions under
8ddb7e2e-…. They get0894ed4f-…once reseeded.Out of scope: 14 files whose name differs from their uuid without a collision (listed in the analysis). A later issue can enforce
file name == uuid.Checks
pytest scripts/tests(325 passed, 11 of them new), dependency policy, lint,miroir-env check --strict --tracked-clean,tscmiroir-core and miroir-app-miroir,npm run test -w miroir-core(3239 passed). All green.modelValidationmiroir-app-miroir 166 passed.versioningModes.assetsLayoutandversioningModes.filesystem-seed(test-filesystem) pass.npm run nonreg:filesystem -- --runner shared: 112 passed, 2 failed. Neither failure comes from this PR, which touches no Report or MiroirTest.unit-274-multistep-reportsexpects 94 seed Reports and finds 96.unit-report-testsexpects a Report suite list withoutreport.agentRunHistory. Both counts moved with the FEATURE: measure what building with coding agents costs on Miroir #550 assets. #602 Postgres stores ML numbers as double precision; Report counts include the #550 Reports #603 (issue Postgres store rejects decimal numbers; two unit tests expect stale Report counts #602) updates both tests, but it merged intoaba, not_integration, so they stay red here until that fix reaches_integration.🤖 Generated with Claude Code
https://claude.ai/code/session_01BHqqe1gocM9Y9mjwK9YX3H