You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG-001: [Simulink model_edit] — Rewire masked SPS physical port — Wrong endpoint or target not found
Reporter: Codex/Sol-Luna Date: 2026-08-11 Severity: High Reproducibility: Always
Summary
model_edit cannot reliably address conserving ports on the masked Specialized Power Systems Saturable Transformer used by the supplied model. Explicit disconnects fail to resolve, while a wildcard disconnect followed by a nominal RConn1/LConn1 restore reports success but restores the wrong transformer endpoint.
Expected Behavior
For each phase, the stable endpoint SID394/395/396 PortHandles.RConn(1) → SID398/399/400 PortHandles.LConn(1) must disconnect and restore. After restore, the handle-level endpoint set and shared physical line must equal the original set exactly, with no additional branch or connection to LConn2, RConn2, RConn3, or RConn4.
Actual Behavior
Three edit attempts were observed. Explicit r/l and y/l targets were rejected and the old line remained. The R1 canonical target was normalized to a nonexistent out1 alias. R2 wildcard removal succeeded, but restoring RConn1 → LConn1 produced a connection to the transformer's LConn2 endpoint instead of the original RConn1.
Reproduction Steps
Prerequisites: MATLAB R2024b with Simulink Agentic Toolkit, the read-only Stage 1 checkpoint below, no model edits saved, and model_edit/model_read available.
Verify the Stage 1 SHA-256 is 169F2C7C9F3A55AAD2FAAB05BE917A076A27B388484E574166D9368F2C7D9F76, then make a disposable copy named migration/stage2/PV_Boost_MMC_10kV_GFM_MIGRATION_STAGE2.slx.
Open the copy and run model_read at root depth 0. Record the A connection blk_398.y1 <-> blk_394.r1 and independently resolve the ports from SID and PortHandles.
Run model_edit in incremental mode with disconnect target blk_398.LConn1 <-> ?. Confirm with model_read and PortConnectivity that only the A direct attachment is absent and unrelated branches are unchanged.
Run model_edit with connect target blk_394.RConn1 <-> blk_398.LConn1. Compare the restored endpoint set and shared line against the pre-disconnect capture.
Observe that the A restore resolves to LConn2 rather than RConn1; close without saving and delete the disposable copy. The minimal reproduction stops here. B and C belong to the fix-acceptance test, not to the captured failure run.
This report reconstructs the reproduction from the exact Phase 7F/R1/R2 captures and Phase 7F-D1 read-only handle evidence. It was not rerun while filing because the user prohibited model creation and editing during Phase 7F-D2.
✓ Unregistered in this host session but present as SATK manifests: check-authoring, checking-model-compliance, building-architecture-models, simulink-single-precision-conversion
browser, documents, gmail, pdf, presentations, sites (2), spreadsheets (2), template-creator, visualize, plus unprefixed imagegen, openai-docs, plugin-creator, skill-creator, skill-installer, and hatch-pet
No registered skill was name-only. ◆ invoked · ✓ unregistered SATK manifest.
Skill Conflict Analysis
N/A — fewer than 2 skills were invoked for this documentation task.
MATLAB
Detail
Value
MATLAB Version
24.2.0.2712019 (R2024b)
MATLAB Working Directory
D:\PV_Inrush_New_Project
Simulink Version
24.2 (R2024b)
Relevant Toolboxes
Simulink; Simulink Test not installed
satk_initialize Status
Toolkit initialized in the attached session; which('model_read') resolved to C:\Users\<REDACTED_USER>\.matlab\agentic-toolkits\simulink\tools\model_read\model_read.p
Connector Port
31515
Platform
Detail
Value
OS
Microsoft Windows 11 Home China, version 10.0.26200, 64-bit
Architecture
win64
Error Output
Phase 7F explicit targets:
Target not found: blk_394.r1 <-> blk_398.l1
Target not found: blk_394.y2 <-> blk_398.l1
Only the two A-phase target strings above were preserved verbatim in the execution record. No B/C error text is reconstructed as though it were captured output.
Phase 7F-R1:
status: error
message: Target not found: blk_398.out1 <-> blk_394.r1
Phase 7F-R2 restore:
status: ok
The subsequent model_read topology was:
blk_398.y1 <-> blk_394.l2
The original topology was:
blk_398.y1 <-> blk_394.r1
Visual Evidence
None. The defect is captured by model topology and handle-level evidence.
Impact
Scope: Workflows that edit conserving ports on this masked Specialized Power Systems topology through model_edit.
Risk: A reported-success rewiring can silently connect the wrong transformer winding terminal.
Workaround: None known through model_edit; wildcard removal alone is insufficient because exact safe restoration is unavailable.
Blocking: Blocks Phase 7F Stage 2 and downstream protection migration that depends on the LV measurement insertion.
Official release/known-issue survey through SATK 2026.08.05; no qualifying fix found
Stage 1 D1 session-local handle evidence: A transformer block 116740.073974609, RConn1116743.073974609; LV-open block 118570.038574219, LConn1118571.038574219; shared line 117007.074340820. Numeric handles are session-local; stable selectors are SID plus PortHandles field/index.
Rollback Record
Attempt
Stop condition
Saved Stage 2
Final Stage 2 artifact
Source-hash result
Phase 7F
Explicit physical pair could not be disconnected; adding the measurement path would have left the original line in parallel
No
Deleted
Research 1B1142..., formal BAB866..., Stage 1 169F2C... unchanged
Phase 7F-R1
Canonical alias normalized to nonexistent out1 and returned target-not-found
No
Deleted
All three frozen hashes unchanged
Phase 7F-R2
Wildcard removal succeeded, but restore connected to transformer LConn2 rather than RConn1
No
Deleted
All three frozen hashes unchanged
Notes
The topology diagnostic independently confirms the intended endpoints and phase order. Observation/hypothesis only: the tool appears to apply an alias mapping for masked SPS ports that can map a requested RConn1 token to another conserving port. This is not a root-cause conclusion and does not prescribe a fix.
Fix Acceptance Test
Use a disposable copy only; resolve ports dynamically from stable SID plus PortHandles field/index. Never persist numeric handles.
Capture the original A/B/C port-handle pairs, line handles, line endpoint sets, and full physical connectivity inventory.
In one run, perform A/B/C disconnect and exact restore sequentially.
After each disconnect, prove only the intended direct line is absent; no unrelated network branch is removed or merged.
After each restore, prove the handle-level endpoint set exactly equals the pre-disconnect pair and the full normalized connectivity inventory returns to its original value.
Explicitly reject any endpoint involving LConn2, RConn2, RConn3, or RConn4 where RConn1 is required.
Include negative tests for displayed y, r, and l aliases; an invalid alias must fail explicitly and must never silently select another endpoint.
Verify all three phases in the same run with no phase crossover or extra branch.
Verify research, formal, and Stage 1 source hashes remain unchanged and no source is saved.
On any failure, close without saving and leave no Stage 2 or passed-test artifact.
Bug Report
BUG-001: [Simulink model_edit] — Rewire masked SPS physical port — Wrong endpoint or target not found
Reporter: Codex/Sol-Luna
Date: 2026-08-11
Severity: High
Reproducibility: Always
Summary
model_editcannot reliably address conserving ports on the masked Specialized Power Systems Saturable Transformer used by the supplied model. Explicit disconnects fail to resolve, while a wildcard disconnect followed by a nominalRConn1/LConn1restore reports success but restores the wrong transformer endpoint.Expected Behavior
For each phase, the stable endpoint
SID394/395/396 PortHandles.RConn(1)→SID398/399/400 PortHandles.LConn(1)must disconnect and restore. After restore, the handle-level endpoint set and shared physical line must equal the original set exactly, with no additional branch or connection toLConn2,RConn2,RConn3, orRConn4.Actual Behavior
Three edit attempts were observed. Explicit
r/landy/ltargets were rejected and the old line remained. The R1 canonical target was normalized to a nonexistentout1alias. R2 wildcard removal succeeded, but restoringRConn1→LConn1produced a connection to the transformer'sLConn2endpoint instead of the originalRConn1.Reproduction Steps
Prerequisites: MATLAB R2024b with Simulink Agentic Toolkit, the read-only Stage 1 checkpoint below, no model edits saved, and
model_edit/model_readavailable.169F2C7C9F3A55AAD2FAAB05BE917A076A27B388484E574166D9368F2C7D9F76, then make a disposable copy namedmigration/stage2/PV_Boost_MMC_10kV_GFM_MIGRATION_STAGE2.slx.model_readat root depth 0. Record the A connectionblk_398.y1 <-> blk_394.r1and independently resolve the ports from SID andPortHandles.model_editin incremental mode with disconnect targetblk_398.LConn1 <-> ?. Confirm withmodel_readandPortConnectivitythat only the A direct attachment is absent and unrelated branches are unchanged.model_editwith connect targetblk_394.RConn1 <-> blk_398.LConn1. Compare the restored endpoint set and shared line against the pre-disconnect capture.LConn2rather thanRConn1; close without saving and delete the disposable copy. The minimal reproduction stops here. B and C belong to the fix-acceptance test, not to the captured failure run.This report reconstructs the reproduction from the exact Phase 7F/R1/R2 captures and Phase 7F-D1 read-only handle evidence. It was not rerun while filing because the user prohibited model creation and editing during Phase 7F-D2.
Minimal Reproduction
No simulation is required.
Environment
Toolkit & Agent
D:/PV_Inrush_New_Projectcheck_matlab_code,detect_matlab_toolboxes,evaluate_matlab_code,model_check,model_edit,model_overview,model_query_params,model_read,model_resolve_params,model_test,run_matlab_file,run_matlab_test_file.vscode/mcp.jsonabsentSkills
Skills · 35 registered · 0 name-only · 1 invoked · 4 unregistered Simulink SATK manifests
SATK
model-based-design-core· 11 registeredbuilding-simulink-models,configuring-block-policy,curating-library-kg, ◆filing-bug-reports,generate-requirement-drafts,managing-simulink-projects,setup-custom-libraries,simulating-simulink-models,specifying-mbd-algorithms,specifying-plant-models,testing-simulink-modelscheck-authoring,checking-model-compliance,building-architecture-models,simulink-single-precision-conversionSATK
matlab-core· 7 registeredmatlab-create-live-script,matlab-debugging,matlab-install-products,matlab-list-products,matlab-read-doc,matlab-review-code,matlab-testingOther registered skill namespaces · 17
browser,documents,gmail,pdf,presentations,sites(2),spreadsheets(2),template-creator,visualize, plus unprefixedimagegen,openai-docs,plugin-creator,skill-creator,skill-installer, andhatch-petNo registered skill was name-only. ◆ invoked · ✓ unregistered SATK manifest.
Skill Conflict Analysis
N/A — fewer than 2 skills were invoked for this documentation task.
MATLAB
D:\PV_Inrush_New_Projectsatk_initializeStatuswhich('model_read')resolved toC:\Users\<REDACTED_USER>\.matlab\agentic-toolkits\simulink\tools\model_read\model_read.pPlatform
Error Output
Phase 7F explicit targets:
Only the two A-phase target strings above were preserved verbatim in the execution record. No B/C error text is reconstructed as though it were captured output.
Phase 7F-R1:
Phase 7F-R2 restore:
The subsequent
model_readtopology was:The original topology was:
Visual Evidence
None. The defect is captured by model topology and handle-level evidence.
Impact
model_edit.model_edit; wildcard removal alone is insufficient because exact safe restoration is unavailable.Related Files
migration/stage1/PV_Boost_MMC_10kV_GFM_MIGRATION_STAGE1.slx169F2C7C9F3A55AAD2FAAB05BE917A076A27B388484E574166D9368F2C7D9F76PV_Boost_MMC_10kV_GFM_PROTECTION_RESEARCH.slx1B114229B3D3E448143AB97B636546F484F7DB51B66589B7A533123649C51C01PV_Boost_MMC_10kV_GFM_WORK.slxBAB86683CB6640A1121040CBAAE6C1138D5BE3B372B3212A5BB6A74282C4B245docs/specs/algorithms/transformer-protection-migration/transformer-protection-migration-stage2-physical-port-diagnostic.mddocs/specs/algorithms/transformer-protection-migration/transformer-protection-migration-stage2-physical-wiring-contract-r1.mddocs/specs/algorithms/transformer-protection-migration/transformer-protection-migration-stage2-satk-fix-survey.md2026.08.05; no qualifying fix foundStage 1 D1 session-local handle evidence: A transformer block
116740.073974609,RConn1116743.073974609; LV-open block118570.038574219,LConn1118571.038574219; shared line117007.074340820. Numeric handles are session-local; stable selectors are SID plusPortHandlesfield/index.Rollback Record
1B1142..., formalBAB866..., Stage 1169F2C...unchangedout1and returned target-not-foundLConn2rather thanRConn1Notes
The topology diagnostic independently confirms the intended endpoints and phase order. Observation/hypothesis only: the tool appears to apply an alias mapping for masked SPS ports that can map a requested
RConn1token to another conserving port. This is not a root-cause conclusion and does not prescribe a fix.Fix Acceptance Test
PortHandlesfield/index. Never persist numeric handles.LConn2,RConn2,RConn3, orRConn4whereRConn1is required.y,r, andlaliases; an invalid alias must fail explicitly and must never silently select another endpoint.Additional Context
No response