Skip to content

[Feature]: Prove incremental and full graph builds are equivalent #37

Description

@Baziar

Problem statement

Workspai already reuses unchanged project/provider output. The remaining risk
is correctness: deletes, renames, shared contracts, or provider-version changes can
leave stale entities or proofs unless incremental output is continuously checked
against a clean build.

Proposed solution

Current foundation

  • incremental Workspace Model builds;
  • incremental-project-cache graph provider protocol;
  • add/change/cache invalidation tests;
  • full rebuild fallback and source fingerprints;
  • PCC re-observation coverage for deletion, Graph overlay aliases, and artifact
    resurrection detection.

Remaining work

Turn equivalence into a release invariant using the shared provider corpus and randomized
mutation sequences. Compare semantic content while excluding only declared
run-local timestamps/metadata.

Acceptance criteria

  • Add, edit, delete, rename, and repeated dirty edits are covered.
  • Cross-file, shared-schema, and cross-project invalidation are covered.
  • Incremental output equals a clean full build for entities, relations, proofs, and omissions.
  • Provider/schema/normalizer version changes invalidate the correct scope.
  • Incomplete Git evidence reports a fallback instead of false reuse.
  • Cancellation preserves the previous valid graph atomically.
  • JSON explains reused, rebuilt, and full-fallback scopes.
  • Randomized mutation runs pass on Linux, macOS, and Windows.

Completion evidence

Publish semantic diff output for the fixed corpus, randomized seed/reproduction
commands, and a measured one-file change on a 10,000-file fixture. Correctness is
the blocker even if a full build is temporarily faster.

Alternatives considered

The following alternatives or adjacent concerns are intentionally outside this issue:

  • redesigning the existing cache protocol;
  • performance claims before correctness passes;
  • distributed graph storage.

Expected impact

Large workspaces can reuse unchanged graph evidence without risking stale
entities, relations, or proofs after source and provider changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: graphGraph providers, identity, relations, proof, and queryneeds-triageScope, owner, or scheduling is not confirmed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions