Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .beads/issues.jsonl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
{"id":"vgi-python-odi","title":"Change max_processes from method to property in Function hierarchy","description":"Refactor max_processes from a method to a property across the Function class hierarchy (Function, ScalarFunction, TableFunctionGenerator, TableInOutFunction, etc.). This makes the API more consistent since max_processes is effectively a constant per function class and properties are more idiomatic for such values.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-04T11:25:29.750648-05:00","created_by":"rusty","updated_at":"2026-01-04T11:50:57.566545-05:00","closed_at":"2026-01-04T11:50:57.566545-05:00","close_reason":"Closed"}
{"id":"vgi-python-p91","title":"Move exception classes from function.py to own file","description":"Move InitIdentifierError and SchemaValidationError from vgi/function.py to a new vgi/exceptions.py file. Update imports in function.py and any other files that reference these exceptions.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-04T09:12:28.058227-05:00","created_by":"rusty","updated_at":"2026-01-04T09:17:52.477661-05:00","closed_at":"2026-01-04T09:17:52.477661-05:00","close_reason":"Closed"}
{"id":"vgi-python-pnm","title":"Create vgi/catalog/read_only_catalog.py - ReadOnlyCatalogInterface","description":"Create ReadOnlyCatalogInterface that prevents all DDL operations.\n\nFiles to create:\n- vgi/catalog/read_only_catalog.py\n\nReadOnlyCatalogInterface(CatalogInterface):\n- Override all DDL methods to raise ReadOnlyError\n- catalog_create, catalog_drop\n- schema_create, schema_drop\n- All table_* DDL methods\n- All view_* DDL methods\n- Transaction methods (optional - could allow read-only transactions)\n\nProperties:\n- supports_transactions = False (class attribute)\n- catalog_version_frozen = True (class attribute)\n\nCreate ReadOnlyError exception class in vgi/exceptions.py.\n\nInclude tests that verify all DDL operations raise ReadOnlyError.","status":"closed","priority":2,"issue_type":"task","created_at":"2026-01-05T19:17:30.998165-05:00","created_by":"rusty","updated_at":"2026-01-05T19:21:50.075345-05:00","closed_at":"2026-01-05T19:21:50.075345-05:00","close_reason":"User requested closure","dependencies":[{"issue_id":"vgi-python-pnm","depends_on_id":"vgi-python-ik9","type":"blocks","created_at":"2026-01-05T19:18:36.574236-05:00","created_by":"rusty"}]}
{"id":"vgi-python-po3","title":"Add InvocationType.CATALOG to protocol","description":"Extend InvocationType enum to support catalog invocations.\n\nFile: vgi/invocation.py\n\nChanges:\n1. Add CATALOG = 'catalog' to InvocationType enum\n2. Update docstring to document the new type\n\nThe CATALOG invocation type indicates:\n- function_name field contains a CatalogInterface method name (e.g., 'catalog_attach', 'schemas', 'table_get')\n- Simplified protocol: invoke → stream (no bind→init→stream phases)\n- Input batch has exactly 1 row with column names matching method parameters\n\nEnsure existing serialization/deserialization handles the new value.","status":"open","priority":1,"issue_type":"task","created_at":"2026-01-05T19:26:40.477214-05:00","created_by":"rusty","updated_at":"2026-01-05T19:26:40.477214-05:00"}
{"id":"vgi-python-po3","title":"Add InvocationType.CATALOG to protocol","description":"Extend InvocationType enum to support catalog invocations.\n\nFile: vgi/invocation.py\n\nChanges:\n1. Add CATALOG = 'catalog' to InvocationType enum\n2. Update docstring to document the new type\n\nThe CATALOG invocation type indicates:\n- function_name field contains a CatalogInterface method name (e.g., 'catalog_attach', 'schemas', 'table_get')\n- Simplified protocol: invoke → stream (no bind→init→stream phases)\n- Input batch has exactly 1 row with column names matching method parameters\n\nEnsure existing serialization/deserialization handles the new value.","status":"in_progress","priority":1,"issue_type":"task","created_at":"2026-01-05T19:26:40.477214-05:00","created_by":"rusty","updated_at":"2026-01-05T19:39:29.693569-05:00"}
{"id":"vgi-python-q1w","title":"Implement optional CatalogStorage with SQLite default","description":"Create optional storage layer for catalog attach_id and transaction_id persistence.\n\nFile: vgi/catalog/storage.py\n\nCatalogStorage protocol:\n- attach_put(attach_id, catalog_name, options) -\u003e None\n- attach_get(attach_id) -\u003e tuple[str, dict] | None\n- attach_delete(attach_id) -\u003e None\n- attach_list() -\u003e list[AttachId]\n- transaction_put(transaction_id, attach_id, state) -\u003e None\n- transaction_get(transaction_id) -\u003e tuple[AttachId, bytes] | None\n- transaction_delete(transaction_id) -\u003e None\n\nCatalogStorageSqlite implementation:\n- Default location: ~/.state/vgi/vgi_catalog.db\n- WAL mode for concurrent access\n- Similar pattern to FunctionStorageSqlite\n\nUsage:\n- CatalogInterface subclasses can optionally use storage\n- Simple catalogs can ignore (return empty attach_id bytes)\n- Catalogs needing persistence override storage attribute\n\nAdd storage class attribute to CatalogInterface with None default.","status":"open","priority":2,"issue_type":"task","created_at":"2026-01-05T19:27:15.084387-05:00","created_by":"rusty","updated_at":"2026-01-05T19:27:15.084387-05:00"}
{"id":"vgi-python-qud","title":"Test FunctionStorageSqlite: global_delete, global_exists, queue_clear","notes":"Coverage: 83% in vgi/function_storage.py. Missing tests for:\n- Line 266: KeyError path in global_get (key not found)\n- Lines 273-278: global_delete method\n- Lines 282-290: global_exists method \n- Line 337: queue_push with empty list\n- Lines 376-385: queue_clear method\n\nThese storage operations need direct unit tests to ensure correctness.","status":"closed","priority":3,"issue_type":"task","created_at":"2026-01-04T22:15:25.982124-05:00","created_by":"rusty","updated_at":"2026-01-04T22:30:05.625934-05:00","closed_at":"2026-01-04T22:30:05.625934-05:00","close_reason":"Added comprehensive tests for FunctionStorageSqlite. Coverage improved from 83% to 98%."}
{"id":"vgi-python-r3t","title":"Consolidate test client infrastructure in testing.py","description":"testing.py has three test client classes (FunctionTestClient, TableFunctionTestClient, ScalarFunctionTestClient) with shared infrastructure patterns. Extend _BaseTestClient pattern to reduce code duplication. Consider using a single unified client with method dispatch based on function type.","status":"closed","priority":3,"issue_type":"task","created_at":"2026-01-04T20:06:53.913912-05:00","created_by":"rusty","updated_at":"2026-01-04T22:02:51.368907-05:00","closed_at":"2026-01-04T22:02:51.368907-05:00","close_reason":"Not warranted - _BaseTestClient already provides shared infrastructure (context manager, log capture, logging). The three clients handle genuinely different protocols (TableInOut with finalize, TableFunction with no input, Scalar with different protocol). Unifying would add type detection complexity without real benefit."}
Expand Down
8 changes: 7 additions & 1 deletion vgi/invocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
in the VGI protocol.

Classes:
InvocationType: Enum distinguishing scalar vs table invocation types.
InvocationType: Enum distinguishing scalar, table, and catalog invocation types.
InitResult: Result from global initialization phase.
Invocation: Complete function invocation request.

Expand Down Expand Up @@ -46,11 +46,17 @@ class InvocationType(Enum):
SCALAR: Scalar function that transforms input batches to single-column output.
TABLE: Table function (either generator or table-in-out) that produces
multi-column output.
CATALOG: Catalog interface method invocation. The function_name field
contains the CatalogInterface method name (e.g., 'catalog_attach',
'schemas', 'table_get'). Uses simplified protocol: invoke → stream
(no bind→init→stream phases). Input batch has exactly 1 row with
column names matching method parameters.

"""

SCALAR = "scalar"
TABLE = "table"
CATALOG = "catalog"


@dataclass(frozen=True, slots=True)
Expand Down
Loading