Skip to content

[TEST-4] [LOW] testFlowBasicFlowTime tests store writes, not time #422

@thedavidmeister

Description

@thedavidmeister

Test name vs. behavior mismatch

File: test/src/concrete/Flow.time.t.sol:12

function testFlowBasicFlowTime(uint256[] memory writeToStore) public {

Claimed behavior

Test name testFlowBasicFlowTime and file name Flow.time.t.sol claim this is a test of flow "time" behaviour.

Actual behavior

The test has no time-related logic. It verifies that when IInterpreterV2.eval2 returns a non-empty writes array, IInterpreterStoreV2.set is called with (DEFAULT_STATE_NAMESPACE, writes). There is no assertion about block.timestamp, no time advancement, no time-bound behaviour. grep "ensure\|time\|timestamp" src/ returns no time-related concept that would justify the name.

The test asserts the store-write side effect of a flow execution. Concept under test is "flow writes kvs to the store", not "flow time".

Proposed correction

Rename to reflect actual coverage:

  • function: testFlowBasicWritesKvsToStore
  • file: Flow.store.t.sol

Or, if a "time" semantic genuinely belongs here, add an assertion that pins it (e.g. block.timestamp readback from store, namespace+key derivation from time, etc.) — currently there is none.

Severity

LOW — name lies but the underlying assertion is otherwise correct. False confidence: a reader scanning the test list believes time semantics are covered when they are not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditAudit findinglowSeverity: lowpass5Audit Pass 5: Correctness

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions