Guard Code atom runtime paths against undefined values in AssemblyMap and nonReplicad handling#1656
Guard Code atom runtime paths against undefined values in AssemblyMap and nonReplicad handling#1656Copilot wants to merge 4 commits into
Conversation
Agent-Logs-Url: https://github.com/BarbourSmith/Abundance/sessions/c3d44838-0fe4-46cd-8081-eb6eecf7fd7b Co-authored-by: BarbourSmith <9359447+BarbourSmith@users.noreply.github.com>
AssemblyMap
|
@copilot I am still seeing a lot of errors like: Please make sure to fully test your changes. |
📸 Puppeteer Test ScreenshotsScreenshots from commit: 9cb7668 Generated 9 screenshot(s): Two Project Comparisonmain.png 📁 S3 Location: Screenshots are stored in Note: S3 images are automatically cleaned up after 30 days. Workflow artifacts are cleaned up after 90 days by GitHub. |
⚡ Performance Metrics Comparison
🔧 GCode Generation & Visualization Metrics
|
Agent-Logs-Url: https://github.com/BarbourSmith/Abundance/sessions/4f24e68a-b856-40cc-bc99-59112e074220 Co-authored-by: BarbourSmith <9359447+BarbourSmith@users.noreply.github.com>
|
@alzatin The issue here is real I think, but I don’t know that the AI solution is in any way meaningful. Does this make any sense to you? |
Agent-Logs-Url: https://github.com/BarbourSmith/Abundance/sessions/4f24e68a-b856-40cc-bc99-59112e074220 Co-authored-by: BarbourSmith <9359447+BarbourSmith@users.noreply.github.com>
... Fixed in commit Validation run:
Screenshot: https://github.com/user-attachments/assets/9ea8c216-defe-4b57-9e72-17ba1739c23c Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
AssemblyMap|
@BarbourSmith ok so i think the errrors you are seeing in the console are errors happening inside github molecules, like there could be an error in the console from a code atom that is failing inside a github molecule even if that atom is not even connected to your final output. i think the problem seems to be that we excecute the code before all inputs are available or ready. I think switching to typescript checking and handling optional inputs in the code atom will get rid of these. TBH is possible that i caused this issue a while back when i wanted the code atom to not be hung up in waiting for geometries that it didn't need even though they were defined as inputs. Is not a problem for the code atom if the geometries are null or undefined but when we run wrapped Abundance methods it triggers an error. |
|
@tristan-huber I'm going to tag you here too because it seems like the real fix to this is to revamp the code atom which I know that you and Mo already have plans for and we should all discuss them at some point maybe next week |



Loading some projects was emitting repeated Code atom runtime errors from two paths:
TypeError: can't access property "geometry", node is undefined(isRealizedLeaf -> processNode -> assemblyMap)TypeError: can't access property "nonReplicadSerialized", atomValue is undefined(buildNonReplicadGeomduringonUpstreamChange)This PR hardens both runtime paths so filtered/missing/undefined values are handled safely.
Code atom traversal hardening (
src/worker/code.ts)assemblyMapcallback contract to allowundefinedreturn values.processNodeacceptundefinedand short-circuit safely.ensureDimensionfrom running on undefined callback results.isRealizedLeafto avoid dereferencing malformed/undefined nodes.Code atom non-replicad guard (
src/prototypes/atom.js)buildNonReplicadGeomto safely handle undefined/null/non-objectatomValuebefore readingnonReplicadSerialized.Regression coverage
tests/code.test.js: added a focused test provingAssemblyMapcan filter leaves by returningundefinedwithout crashing.tests/atom-nonreplicad-guard.test.js: added a focused test validatingbuildNonReplicadGeomdoes not throw on undefined/primitive values and keeps non-replicad geometry state valid.Behavioral impact