phetsims / geometric-optics

Geometric Optics is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 5 forks source link

CT: most preferences should be phetioState: false #446

Closed KatieWoe closed 2 years ago

KatieWoe commented 2 years ago

Also in Basics:

geometric-optics : phet-io-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/geometric-optics/geometric-optics_en.html?continuousTest=%7B%22test%22%3A%5B%22geometric-optics%22%2C%22phet-io-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1663766462945%22%2C%22timestamp%22%3A1663773208856%7D&ea&brand=phet-io&phetioStandalone&fuzz&memoryLimit=1000
Query: ea&brand=phet-io&phetioStandalone&fuzz&memoryLimit=1000
Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at assert (phetioAPIValidation.ts:114:18)
at Array.forEach
at forEach (phetioAPIValidation.ts:103:7)
at validatePreferencesModel (phetioAPIValidation.ts:86:11)
at onSimStarted (phetioEngine.ts:382:28)
at listener (TinyEmitter.ts:95:8)
at emit (ReadOnlyProperty.ts:304:22)
at _notifyListeners (ReadOnlyProperty.ts:255:13)
at unguardedSet (ReadOnlyProperty.ts:239:11)
id: Bayes Puppeteer
Snapshot from 9/21/2022, 7:21:02 AM

----------------------------------

geometric-optics : phet-io-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/geometric-optics/geometric-optics_en.html?continuousTest=%7B%22test%22%3A%5B%22geometric-optics%22%2C%22phet-io-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1663766462945%22%2C%22timestamp%22%3A1663780050179%7D&ea&brand=phet-io&phetioStandalone&fuzz&memoryLimit=1000
Query: ea&brand=phet-io&phetioStandalone&fuzz&memoryLimit=1000
Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at assert (phetioAPIValidation.ts:114:18)
at Array.forEach
at forEach (phetioAPIValidation.ts:103:7)
at validatePreferencesModel (phetioAPIValidation.ts:86:11)
at onSimStarted (phetioEngine.ts:382:28)
at listener (TinyEmitter.ts:95:8)
at emit (ReadOnlyProperty.ts:304:22)
at _notifyListeners (ReadOnlyProperty.ts:255:13)
at unguardedSet (ReadOnlyProperty.ts:239:11)
id: Bayes Puppeteer
Snapshot from 9/21/2022, 7:21:02 AM

----------------------------------

geometric-optics : phet-io-state-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/phet-io-wrappers/state/?sim=geometric-optics&phetioDebug=true&phetioWrapperDebug=true&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22geometric-optics%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1663766462945%22%2C%22timestamp%22%3A1663773312948%7D
Uncaught Error: Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at assert (phetioAPIValidation.ts:114:18)
at Array.forEach
at forEach (phetioAPIValidation.ts:103:7)
at validatePreferencesModel (phetioAPIValidation.ts:86:11)
at onSimStarted (phetioEngine.ts:382:28)
at listener (TinyEmitter.ts:95:8)
at emit (ReadOnlyProperty.ts:304:22)
at _notifyListeners (ReadOnlyProperty.ts:255:13)
at unguardedSet (ReadOnlyProperty.ts:239:11)
id: Bayes Puppeteer
Snapshot from 9/21/2022, 7:21:02 AM

----------------------------------

geometric-optics : phet-io-state-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/phet-io-wrappers/state/?sim=geometric-optics&phetioDebug=true&phetioWrapperDebug=true&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22geometric-optics%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1663766462945%22%2C%22timestamp%22%3A1663779514957%7D
Uncaught Error: Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at assert (phetioAPIValidation.ts:114:18)
at Array.forEach
at forEach (phetioAPIValidation.ts:103:7)
at validatePreferencesModel (phetioAPIValidation.ts:86:11)
at onSimStarted (phetioEngine.ts:382:28)
at listener (TinyEmitter.ts:95:8)
at emit (ReadOnlyProperty.ts:304:22)
at _notifyListeners (ReadOnlyProperty.ts:255:13)
at unguardedSet (ReadOnlyProperty.ts:239:11)
id: Bayes Puppeteer
Snapshot from 9/21/2022, 7:21:02 AM

----------------------------------

geometric-optics : phet-io-studio-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/studio/?sim=geometric-optics&phetioWrapperDebug=true&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22geometric-optics%22%2C%22phet-io-studio-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1663766462945%22%2C%22timestamp%22%3A1663773533905%7D
Uncaught Error: Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at assert (phetioAPIValidation.ts:114:18)
at Array.forEach
at forEach (phetioAPIValidation.ts:103:7)
at validatePreferencesModel (phetioAPIValidation.ts:86:11)
at onSimStarted (phetioEngine.ts:382:28)
at listener (TinyEmitter.ts:95:8)
at emit (ReadOnlyProperty.ts:304:22)
at _notifyListeners (ReadOnlyProperty.ts:255:13)
at unguardedSet (ReadOnlyProperty.ts:239:11)
id: Bayes Puppeteer
Snapshot from 9/21/2022, 7:21:02 AM

----------------------------------

geometric-optics : phet-io-studio-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/studio/?sim=geometric-optics&phetioWrapperDebug=true&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22geometric-optics%22%2C%22phet-io-studio-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1663766462945%22%2C%22timestamp%22%3A1663779869274%7D
Uncaught Error: Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at assert (phetioAPIValidation.ts:114:18)
at Array.forEach
at forEach (phetioAPIValidation.ts:103:7)
at validatePreferencesModel (phetioAPIValidation.ts:86:11)
at onSimStarted (phetioEngine.ts:382:28)
at listener (TinyEmitter.ts:95:8)
at emit (ReadOnlyProperty.ts:304:22)
at _notifyListeners (ReadOnlyProperty.ts:255:13)
at unguardedSet (ReadOnlyProperty.ts:239:11)
id: Bayes Puppeteer
Snapshot from 9/21/2022, 7:21:02 AM

----------------------------------

geometric-optics : phet-io-wrappers-tests : assert
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/phet-io-wrappers/phet-io-wrappers-tests.html?sim=geometric-optics&phetioDebug=true&phetioWrapperDebug=true
32 out of 33 tests passed. 1 failed.
SimTests: geometric-optics: event indexing failed:
Uncaught Error: Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/tandem/js/phetioAPIValidation.js:89:17
at Array.forEach (<anonymous>)
at PhetioAPIValidation.validatePreferencesModel (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/tandem/js/phetioAPIValidation.js:79:109)
at PhetioAPIValidation.onSimStarted (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/tandem/js/phetioAPIValidation.js:62:12)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/phet-io/js/phetioEngine.js:318:29
at TinyProperty.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/axon/js/TinyEmitter.js:69:9)
at Property._notifyListeners (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/axon/js/ReadOnlyProperty.js:228:23)
at Property.unguardedSet (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/axon/js/ReadOnlyProperty.js:178:14)
at Property.set (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/axon/js/ReadOnlyProperty.js:161:12)

Uncaught Error: Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypePropertyError: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at assert (phetioAPIValidation.ts:114:18)
at Array.forEach
at forEach (phetioAPIValidation.ts:103:7)
at validatePreferencesModel (phetioAPIValidation.ts:86:11)
at onSimStarted (phetioEngine.ts:382:28)
at listener (TinyEmitter.ts:95:8)
at emit (ReadOnlyProperty.ts:304:22)
at _notifyListeners (ReadOnlyProperty.ts:255:13)
at unguardedSet (ReadOnlyProperty.ts:239:11)
id: Bayes Puppeteer
Snapshot from 9/21/2022, 7:21:02 AM

----------------------------------

geometric-optics : phet-io-wrappers-tests : no-assert
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/phet-io-wrappers/phet-io-wrappers-tests.html?sim=geometric-optics
30 out of 31 tests passed. 1 failed.
SimTests: geometric-optics: event indexing failed:
Uncaught Error: Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/tandem/js/phetioAPIValidation.js:89:17
at Array.forEach (<anonymous>)
at PhetioAPIValidation.validatePreferencesModel (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/tandem/js/phetioAPIValidation.js:79:109)
at PhetioAPIValidation.onSimStarted (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/tandem/js/phetioAPIValidation.js:62:12)
at https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/phet-io/js/phetioEngine.js:318:29
at TinyProperty.emit (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/axon/js/TinyEmitter.js:69:9)
at Property._notifyListeners (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/axon/js/ReadOnlyProperty.js:228:23)
at Property.unguardedSet (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/axon/js/ReadOnlyProperty.js:178:14)
at Property.set (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/chipper/dist/js/axon/js/ReadOnlyProperty.js:161:12)

Uncaught Error: Uncaught Error: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypePropertyError: Assertion failed: most preferences should be phetioState: false, key=geometricOptics.general.model.preferencesModel.simulationModel.focalLengthModelTypeProperty
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1663766462945/assert/js/assert.js:28:13)
at assert (phetioAPIValidation.ts:114:18)
at Array.forEach
at forEach (phetioAPIValidation.ts:103:7)
at validatePreferencesModel (phetioAPIValidation.ts:86:11)
at onSimStarted (phetioEngine.ts:382:28)
at listener (TinyEmitter.ts:95:8)
at emit (ReadOnlyProperty.ts:304:22)
at _notifyListeners (ReadOnlyProperty.ts:255:13)
at unguardedSet (ReadOnlyProperty.ts:239:11)
id: Bayes Puppeteer
Snapshot from 9/21/2022, 7:21:02 AM
pixelzoom commented 2 years ago

This is failing an assertion that was added to phetioAPIValidation.ts yesterday by @samreid:

  public validatePreferencesModel(): void {
...
        // Audio manager, color profile property and localeProperty are supposed to be stateful. All other preferences
        // should be phetioState: false so they are not captured in the state
        assert && assert( phetioObject.phetioState ===
                          ( phetioObject.phetioID.endsWith( '.colorProfileProperty' ) ||
                            phetioObject.phetioID.endsWith( '.audioEnabledProperty' ) ||
                            phetioObject.phetioID.endsWith( '.localeProperty' ) ),
          'most preferences should be phetioState: false, key=' + preferencesKey );

This assertion is based on an incorrect assumption. Properties under preferencesModel.simulationModel should most definitely be stateful.

pixelzoom commented 2 years ago

@samreid addressed this in https://github.com/phetsims/tandem/commit/994c22c0e4b74eabc9f6eb3cdbd727a40f8591e4.

I'll wait for CT to confirm before closing.

pixelzoom commented 2 years ago

CT is happy. Closing.