Skip to content

Align request TraceChain and SQLite order-page conformance #49

Description

@philipgreat

Objective

Implement the unified request-owned business TraceChain contract, distinct from the existing physical tracePath, across TeaQL runtimes and generator scopes.

Contract

  • Each real query request owns a nonblank local comment. Application roots require caller comment and purpose.
  • Framework-derived requests may resolve default comments from actual operation/model metadata. Explicit child comments survive.
  • Preserve the language-native Q-operation parent and the nested query comment as separate nodes. Retain count/facet caller aliases.
  • Immutable parent ownership; root-resolved purpose; concurrent reusable child templates remain isolated.
  • Business traceChain and physical tracePath remain separate. Safe log projections preserve structure while masking sensitive intent.
  • No what:/why: prefix parsing/rejection. Mutation entities may inherit parent reasons; do not strengthen this into handwritten comments per entity.
  • Generated workspaces delegate to the formal runtime instead of duplicating request/trace semantics.

SQLite acceptance

Use a bounded customer-order model/query covering dynamic search, countAs(totalOrders), facetByStatusAs(statusCounts), status count and sum(totalAmount), status selection, ordered item previews limited to 3, complete itemCount, date/id descending order, purpose/comment and page execution.
Observe actual SQLite statements and runtime-created chains; assert data, counts, facet sums, per-parent child limits, explicit/default comments, alias escaping, snapshot isolation, logging off, intent validation and masking. A single SQL with multiple aggregate expressions remains one physical evidence record.
Retain exact commands, source revisions and red/green results. Keep all examples local-source; regenerate derived libraries rather than patching them.

Non-goals and compatibility

No multi-database qualification, public release, release-tag change or public generator deployment in this implementation task. SQLite is the requested provider boundary. Generated-library migration may require regeneration; keep native business query spelling where practical.

Coordination

Primary issue: teaql/teaql-rs#246
This issue owns the teaql-python changes and their acceptance evidence. Design source: teaql-conformance/design/polyglot-request-trace-chain.md (2026-10-11 request-comment clarification).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions