Commit 5d90246d authored by Jan Reimes's avatar Jan Reimes
Browse files

fix(ai): don't use TDoc checkout for specs in add-members

- Specs should not use the TDoc checkout flow
- Only TDocs (SourceKind.TDOC) use checkout_tdoc_to_workspace()
- Specs store the spec number as source_path for now
- Prevents 'Invalid agenda item number' warnings from TDoc parsing
parent b4bae07b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -331,14 +331,14 @@ def workspace_add_members(
    for item in items:
        source_path = item

        # For TDocs/specs, try to resolve/checkout to get actual path
        if checkout and source_kind in (SourceKind.TDOC, SourceKind.SPEC):
        # For TDocs, try to resolve/checkout to get actual path
        # Specs are handled differently - store the spec number for now
        if checkout and source_kind == SourceKind.TDOC:
            checkout_path = checkout_tdoc_to_workspace(item, checkout_base, storage, workspace)
            if checkout_path:
                source_path = str(checkout_path)
                # Ensure .ai subfolder exists
                ensure_ai_subfolder(checkout_path)

        members.append(make_workspace_member(workspace, item, source_path, source_kind))

    count = storage.add_workspace_members(workspace, members)