Skip to content

⚡ Optimize upstream version fetching concurrency#43

Draft
google-labs-jules[bot] wants to merge 787 commits intomainfrom
perf/optimize-fetch-upstream-versions-17838001028358022627
Draft

⚡ Optimize upstream version fetching concurrency#43
google-labs-jules[bot] wants to merge 787 commits intomainfrom
perf/optimize-fetch-upstream-versions-17838001028358022627

Conversation

@google-labs-jules
Copy link
Contributor

What: Optimized _fetch_upstream_versions in skillmeat/cache/refresh.py.
Why: The original implementation performed sequential synchronous HTTP requests inside an async loop, blocking the event loop and causing slow performance (O(n) latency).
How:

  • Replaced sequential loop with asyncio.gather for concurrent execution.
  • Used asyncio.to_thread to offload blocking GitHubClient.resolve_version calls to a thread pool.
  • Added helper function fetch_single_artifact for cleaner error handling per artifact.

Measurements:

  • Baseline (20 artifacts, 0.1s simulated latency): ~2.00s
  • Optimized: ~0.31s
  • Improvement: ~6x faster (bounded by overhead/threading, for I/O bound tasks this scales much better).

PR created automatically by Jules for task 17838001028358022627 started by @miethe

miethe and others added 30 commits December 26, 2025 15:20
Implement the previously stubbed import coordinator download functionality
to complete the marketplace-to-collection import flow:

- Add _download_artifact method with GitHub API file download
  - Parse GitHub URLs (tree/blob/root formats)
  - Recursive directory download
  - Rate limiting with exponential backoff
  - Binary vs text file handling

- Add _update_manifest method to update collection manifest.toml
  - Use ManifestManager for atomic writes
  - Create Artifact with proper metadata
  - Handle duplicate artifacts (overwrite scenario)

- Wire download flow in _process_entry replacing stub
  - Download files to target directory
  - Update manifest on success
  - Proper error handling and logging

- Fix tests to mock HTTP calls
  - Add mock_download fixture
  - Add mock_manifest fixture
  - All 36 import coordinator tests pass

Refs: Phase 3, REM-3.1, REM-3.2, REM-3.3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The SourceResponse schema required the field but source_to_response()
wasn't passing it, causing Pydantic validation errors.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
ScanResultDTO only had artifacts_found (count) but router needed to
iterate over actual artifacts list. Added:
- artifacts: List[DetectedArtifact] field to ScanResultDTO schema
- artifacts parameter to GitHubScanner.scan_repository() returns
- model_rebuild() call to resolve forward reference

Fixes scan failing with "'ScanResultDTO' object has no attribute 'artifacts'"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix Sync button: wire onRescan prop in sources page to trigger rescan
  mutation with proper cache invalidation and toast notifications
- Fix Edit/Delete buttons: move from overlapping header position to
  footer bar, left of Rescan button for proper layout
- Refactor Open button: rename to "Source" with ExternalLink icon,
  opens GitHub repo in new tab instead of internal navigation
- Preserve card click navigation to detail page

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ion plan

Add planning and tracking artifacts for marketplace confidence score improvements:

- PRD: Tooltip breakdown, filtering, score normalization
- Implementation Plan: 6 phases, 40 tasks, 21 story points
- Progress tracking: Phase 1-2 (backend), Phase 3-5 (frontend), Phase 6 (testing)
- Context file: Technical notes and key decisions

Key improvements:
- Fix scoring algorithm (max 65 → 0-100 normalized)
- Add ScoreBreakdown component (reusable in modal/tooltip)
- Add confidence filter controls with URL persistence
- Show hidden low-confidence artifacts on toggle

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add MAX_RAW_SCORE=65 constant and normalize_score() function (TASK-1.1)
- Create Alembic migration for raw_score and score_breakdown columns (TASK-2.1)
- Add min_confidence, max_confidence, include_below_threshold params (TASK-2.5)

Phase 1-2, Batch 1 of confidence-score-enhancements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…nd filters

- Refactor _score_directory() to return breakdown dict (TASK-1.2)
- Add raw_score and score_breakdown ORM columns (TASK-2.2)
- Create data migration to populate raw_score (TASK-2.9)
- Implement confidence range filter logic (TASK-2.6)
- Implement low-confidence toggle with CONFIDENCE_THRESHOLD=30 (TASK-2.7)

Phase 1-2, Batch 2 of confidence-score-enhancements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…icMatch

- Implement complete breakdown dict with normalized_score (TASK-1.3)
- Add raw_score and breakdown fields to HeuristicMatch schema (TASK-1.6)
- Pass breakdown through to HeuristicMatch construction
- Add validation constraints (0-65 for raw_score)

Phase 1-2, Batch 3 of confidence-score-enhancements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Verify normalization integration in detector (TASK-1.4)
- Add raw_score and score_breakdown to CatalogEntryResponse (TASK-2.3)
- Hydrate breakdown data in catalog query responses (TASK-2.4)
- Complete data flow from DB to API response

Phase 1-2, Batch 4 of confidence-score-enhancements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add 15 unit tests for normalize_score() and breakdown structure (TASK-1.5)
- Add 13 integration tests for confidence filtering endpoints (TASK-2.8)
- Test edge cases: 0, negative, max, threshold interactions
- Test response includes raw_score and score_breakdown fields

Phase 1-2, Batch 5 of confidence-score-enhancements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- All 15 tasks completed (6 normalization + 9 database/API)
- 28 tests passing (15 unit + 13 integration)
- Quality gates verified

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add frontend components for confidence score transparency:

Phase 3 - Modal:
- CatalogEntryModal with full artifact details
- HeuristicScoreBreakdown showing signal contributions
- Accessibility features (ARIA, keyboard nav)
- Storybook stories for documentation

Phase 4 - Tooltip:
- ScoreBreakdownTooltip for hover breakdown display
- ScoreBadge enhanced with optional breakdown prop
- Keyboard accessible tooltip (focus triggers display)
- Comprehensive stories and tests

Phase 5 - Filter:
- ConfidenceFilter with min/max inputs + threshold toggle
- URL query param sync for shareable filter URLs
- Debounced inputs to prevent excessive API calls
- Loading indicator during filter refetch

Components:
- CatalogEntryModal.tsx (modal with metadata/breakdown)
- HeuristicScoreBreakdown.tsx (signal table display)
- ScoreBreakdownTooltip.tsx (Radix tooltip wrapper)
- ConfidenceFilter.tsx (range filter + checkbox)

Types updated:
- CatalogEntry: added raw_score, score_breakdown
- CatalogFilters: added max_confidence, include_below_threshold

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updated progress file to reflect completion of all 21 tasks across three phases:

Phase 3 (Modal): 9 tasks
- CatalogEntryModal component with full artifact details
- Header, confidence section, description, file list
- Action buttons with import and GitHub links
- Full accessibility features and Storybook stories

Phase 4 (Tooltip): 5 tasks
- ScoreBreakdownTooltip wrapper component
- ScoreBadge enhanced with optional breakdown prop
- Keyboard accessibility and Storybook stories

Phase 5 (Filter): 7 tasks
- ConfidenceFilter component with min/max controls
- URL query param sync for shareable URLs
- Integration with marketplace source detail page
- Comprehensive unit tests

Status: 100% complete, ready for production

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ayout issues

Fixes three bugs in the marketplace source modal:

1. Header placeholder - replaced stub text with actual entry info:
   - Name, type badge, status badge, confidence score, path

2. Score breakdown never available - fixed data flow from detector to DB:
   - Added raw_score/score_breakdown fields to DetectedArtifact schema
   - Modified _matches_to_artifacts() to populate from HeuristicMatch
   - Updated _artifact_to_dict() to include in DB insertion dict

3. Modal layout - restructured for proper scrolling:
   - Fixed height flex layout (85vh) with overflow-hidden
   - Scrollable content area with overflow-x-hidden
   - Bounded confidence section (max-h-200px) with own scroll
   - Sticky footer with border-top separator

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The CommandDialog component was missing a DialogTitle inside DialogContent,
causing a Radix UI accessibility warning. Added visually hidden DialogTitle
with sr-only class to satisfy screen reader requirements per Radix UI specs.

Follows the pattern established in CatalogEntryModal component.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove custom aria-describedby and id attributes that were overriding
Radix UI's automatic ARIA linking. This fixes the console error:
"DialogContent requires a DialogTitle for accessibility"

Same pattern as previous fix in commit 0abde84 for BulkImportModal
and ParameterEditorModal.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
E2E tests and visual polish work deferred for future sprint.
Core functionality (Phases 1-5) is complete and functional.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add implementation plan for minimal sourcing algorithm update
- Create progress tracking artifact with 7 tasks
- Algorithm will detect plugin structures and skip container directories
- Assigned to python-backend-engineer, estimated 14 hours

Scope: Fix false positives where "commands", "agents", etc. directories
are incorrectly detected as entities when they're actually containers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add _is_plugin_directory() to detect directories with 2+ entity-type subdirs
- Add _is_container_directory() to identify entity-type containers (skills/, commands/, etc.)
- Modify analyze_paths() to skip container directories before scoring
- Add 13 new tests covering plugin detection, container skipping, backward compatibility

This fixes false positives where entity-type container directories (commands/,
agents/, skills/, hooks/, rules/, mcp/) were incorrectly detected as entities
instead of being recognized as organizational containers.

Refs: Phase 1, TASK-1.1 to TASK-1.7

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…entation plan

Design refactor for marketplace catalog entry modal to display file contents
before import, using a customized version of the unified-entity-modal pattern.

Key decisions:
- Create enhanced CatalogEntryModal (not extend unified-entity-modal)
- Add Overview and Contents tabs with read-only file browser
- Two-layer caching: TanStack Query (5min/30min) + Backend LRU (1hr/2hr)
- New API endpoints for GitHub file tree and content fetching

Implementation: 3 phases, 28 tasks, ~34 story points

PRD: docs/project_plans/PRDs/features/catalog-entry-modal-enhancement-v1.md
Plan: docs/project_plans/implementation_plans/features/catalog-entry-modal-enhancement-v1.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add method to fetch file trees from GitHub repositories using the Git
Trees API. This enables displaying artifact contents in the catalog
modal's Contents tab.

- Fetches recursive tree with optional SHA parameter
- Auto-fetches default branch SHA if not provided
- Filters results by path prefix
- Returns normalized entries with path, type, size (blobs), sha
- Handles rate limits via RateLimitError exception
- Includes comprehensive test coverage (8 new tests)

Part of catalog-entry-modal-enhancement feature (TASK-1.1)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add specialized LRU cache with TTL support for GitHub file tree and content
operations. This caching layer reduces redundant GitHub API calls when users
browse artifact file structures repeatedly in the catalog modal.

Features:
- Thread-safe LRU cache with configurable max entries (default 1000)
- Per-entry TTL support (1hr for trees, 2hr for contents)
- Key builder helpers for consistent cache key formatting
- Global singleton with thread-safe initialization
- Comprehensive test coverage (20 tests)

Part of catalog-entry-modal-enhancement feature (TASK-1.5).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add endpoint to retrieve file content from marketplace artifacts with caching:
- GET /marketplace/sources/{id}/artifacts/{path}/files/{file_path}
- Returns file content with metadata (encoding, size, SHA, is_binary)
- Uses 2-hour TTL cache to reduce GitHub API calls
- FileContentResponse DTO for response serialization

TASK-1.4 of catalog-entry-modal-enhancement feature.

Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add GET /marketplace-sources/{id}/artifacts/{path}/files endpoint that
returns the file tree for a marketplace artifact. This enables the
catalog entry modal to display browsable file structures.

Implementation includes:
- FileTreeEntry and FileTreeResponse DTOs in marketplace schemas
- File tree endpoint with 1hr cache TTL using GitHubFileCache
- Integration with GitHubScanner.get_file_tree() method
- 404 handling for missing sources and artifact paths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add RateLimitError handling to get_artifact_file_tree() and
get_artifact_file_content() endpoints. When GitHub rate limits are
exceeded, endpoints now return HTTP 429 with Retry-After header
containing the seconds until rate limit reset.

- Import RateLimitError from github_scanner
- Add parse_rate_limit_retry_after() helper to extract wait time
- Return JSONResponse with 429 status and appropriate headers
- Log rate limit events at warning level

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive unit tests for TASK-1.7 Phase 1:
- TestGetFileTree: 6 tests for file tree endpoint
- TestGetFileContent: 8 tests for file content endpoint
- TestGitHubCacheIntegration: 6 tests for cache utility
- TestFileEndpointsRateLimiting: 5 tests for rate limit handling
- TestDeleteSource: 2 bonus tests for delete endpoint

Total: 27 tests covering happy path, error cases, caching,
rate limits, binary files, and nested paths.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
All 8 tasks completed with quality gate passing:
- TASK-1.1: get_file_tree() method (31224e8)
- TASK-1.2: get_file_content() method (31224e8)
- TASK-1.5: GitHubFileCache caching layer (38d4c31)
- TASK-1.3: File tree endpoint (2832481)
- TASK-1.4: File content endpoint (95b89f0)
- TASK-1.6: Rate limit detection with HTTP 429 (a6eba8a)
- TASK-1.7: 27 unit tests for new endpoints (e73d8f5)
- TASK-1.8: OpenAPI auto-generated from FastAPI

Quality gate verified:
- All 27 unit tests passing
- OpenAPI spec includes 4 file endpoints
- Rate limit handling with Retry-After header
- Cache TTLs: 1hr (trees), 2hr (contents)
- No security vulnerabilities found

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 2 of catalog-entry-modal-enhancement:

- Add readOnly mode to FileTree and ContentPane components
- Refactor CatalogEntryModal with Radix UI Tabs (Overview/Contents)
- Create TanStack Query hooks for file tree and content fetching
- Add API client functions for marketplace file endpoints
- Implement Contents tab with split FileTree + ContentPane layout
- Add error states with rate limit detection and retry options
- Configure query caching (5min/30min stale, 30min/2hr gc)
- Style tab layout to match unified-entity-modal patterns

Tasks completed: TASK-2.1 through TASK-2.10

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
TASK-3.1: Auto-select default file in Contents tab
- Add useEffect to auto-select first .md file when tree loads
- Fallback to first file alphabetically if no markdown
- Preserve user selections (don't override)

TASK-3.2: Implement file size truncation
- Truncate files >1MB to first 10,000 lines
- Add truncated and original_size fields to FileContentResponse
- Binary files excluded from truncation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
miethe and others added 28 commits January 13, 2026 16:16
When artifacts were added to user collections but not cached in the
database, the metadata service fallback returned type="unknown" which
broke the frontend modal display showing "Entity type 'unknown' is not
yet supported for detailed display."

Root cause: The fallback didn't parse the artifact_id (format: type:name)
to extract the actual type.

Changes:
- Add _parse_artifact_id() helper to extract type and name from IDs
- Update get_artifact_metadata() fallback to use parsed values
- Artifacts with ID "agent:my-agent" now correctly return type="agent"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Single-file artifacts (agents, commands stored as .md files) were returning
404 when trying to view their contents. The file endpoints assumed all
artifacts were directories containing files, but single-file artifacts
have artifact.path pointing directly to the file.

Root cause: Endpoints constructed paths like:
  artifact_root / file_path = agents/prd-writer.md/prd-writer.md (invalid)

Fix: Added is_single_file_artifact detection in all file endpoints:
- GET /{artifact_id}/files/{file_path}: Return content if path matches
- PUT /{artifact_id}/files/{file_path}: Allow updates if path matches
- POST /{artifact_id}/files/{file_path}: Reject with 400 (single-file)
- DELETE /{artifact_id}/files/{file_path}: Reject with 400 (use artifact delete)

The list_artifact_files endpoint already handled this correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rules are always loaded into context, so slim them to essential guidance
only. Detailed patterns moved to on-demand context files.

Changes:
- Slim rules from ~1200 lines to ~240 lines (~12K tokens saved/session)
- Create 5 new key-context files with full patterns and examples
- Update CLAUDE.md Progressive Disclosure section

Rules now contain:
- Prime directives and critical conventions
- Quick reference tables
- Links to detailed context files

New context files:
- debugging-patterns.md - Bug categories, delegation patterns
- router-patterns.md - Full FastAPI examples
- component-patterns.md - React/shadcn patterns
- nextjs-patterns.md - App Router patterns
- testing-patterns.md - Jest/Playwright templates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add __main__.py unified pipeline orchestrator that runs
  extract → tag → split → validate in one command
- Add post-tool hook for automatic symbol updates on code changes
- Add pre-commit validation hook for symbol file integrity
- Fix init_symbols.py to detect package-based structures
  (e.g., skillmeat/api/, skillmeat/web/) by checking for
  Python packages with __init__.py
- Update README.md with unified pipeline documentation
- Update symbols.config.json with correct project paths

The unified pipeline supports:
- --domain flag (all, ui, web, api)
- --skip-split and --skip-validate flags
- --changed-only for incremental updates
- --verbose for detailed output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The Contents and Sync Status tabs had `flex` in their TabsContent
className, which overrode Radix UI's `display: none` for inactive tabs.
This caused multiple tabpanels to render with `display: flex` and split
the available space.

Fix: Use `data-[state=active]:flex` variant so flex display only applies
when the tab is active. Content height now correctly fills the modal.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, the artifact_to_response() function checked artifact.origin
== "github" to decide whether to use the upstream URL as the source.
This caused artifacts with valid upstream URLs but non-"github" origin
values to incorrectly return "local" as their source.

Changed to check artifact.upstream directly - if it has a value, use it;
otherwise fall back to "local". This enables the Sync Status tab's
"Source vs Collection" comparison for artifacts with valid upstreams.

Root cause: Sync Status tab disabled when source was "local" even when
upstream tracking was configured.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Two changes to fix the Sync Status tab not rendering content when
viewing artifacts from /collection page:

1. sync-status-tab.tsx: Remove `mode === 'project'` constraint from
   projectDiff query enabled condition. The query should run whenever
   a valid projectPath exists, regardless of viewing mode.

2. unified-entity-modal.tsx: Auto-select first deployment's project
   path when viewing from collection mode. This ensures projectPath
   is populated from artifact deployments.

Root cause: Collection view sets mode='collection' but projectDiff
query was only enabled for mode='project'. Even when projectPath was
provided via selectedProjectForDiff, the mode check blocked the query.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, the diff endpoint returned 404 for any artifact without a
deployment tracking record in .skillmeat-deployed.toml. This broke sync
status for:
- Manually deployed artifacts (copied directly)
- Artifacts deployed before SkillMeat tracking was implemented

Now when no deployment record exists:
1. Use "default" collection (or specified collection parameter)
2. Infer artifact path using standard conventions:
   - skill → skills/{name}
   - command → commands/{name}
   - agent → agents/{name}.md or agents/pm/{name}.md
   - hook → hooks/{name}
   - mcp → mcp/{name}
3. Try each path until one exists in the project
4. Only 404 if artifact not found in ANY expected location

Root cause: Sync Status tab showed 404 for most artifacts that weren't
deployed via the SkillMeat tool.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Update symbols.config.json with correct SkillMeat paths:
  - Python: skillmeat/api, skillmeat/core, etc.
  - TypeScript: skillmeat/web/app, components, hooks, lib
  - Disable redundant ui and shared domains

- Fix split_api_by_layer.py to handle flat symbol format:
  - Detect both {"symbols": []} and {"modules": []} formats
  - Group flat symbols by path to create module structure
  - Fix KeyError for empty layers with .get() fallback
  - Fix datetime deprecation warning

- Update validate_symbols.py to accept async kinds:
  - Add async_function and async_method to VALID_KINDS

- Generate symbol files:
  - symbols-web.json: 167 TypeScript/React symbols
  - symbols-api.json: 30 Python backend symbols
  - Layer-split files for token-efficient loading

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Switch from JSON storage to binary BLOBs (struct packed float32) for embeddings in HaikuEmbedder.
- Reduce storage size by ~75% and improve read performance by ~3x.
- Add backward compatibility to transparently read existing JSON records.
- Add compatibility tests.
- Update existing tests to handle float precision differences.
The `bulk_update_artifacts` method was inefficiently updating artifacts by iterating through a list and executing a separate database query for each one. This N+1 query pattern caused significant performance degradation when updating a large number of artifacts.

This commit refactors the method to use SQLAlchemy's `bulk_update_mappings` function. This allows all artifact updates to be performed in a single, efficient bulk operation, drastically reducing the number of database queries and improving performance.

Testing was limited due to environmental constraints preventing the installation of dependencies. The change has been manually verified and will be validated by the CI pipeline.
The API base URL in skillmeat/cli.py was hardcoded to localhost, making it difficult to configure for different environments.

This change introduces a `get_api_base_url` method in the `ConfigManager` to provide a centralized configuration point for the API base URL, with a default of 'http://localhost:8080'. The CLI has been updated to use this new configuration, improving flexibility and maintainability.

This also fixes a bug where one command was hardcoded to use port 8000 instead of 8080.
- Replace mock projects with `useProjects` hook in `DeployToProjectDialog`.
- Implement `deployContextEntity` API function.
- Implement `useDeployContextEntity` mutation hook.
- Add `useDeployContextEntity` to hooks registry.
- Handle loading and error states in the dialog.
- Implement deployment logic with success/error feedback.
…query to SQLite only and rolling back before the fallback query to avoid PendingRollbackError. The change is in github_scanner.py.
…chitecture-stable with explicit little-endian floats in haiku_embedder.py. Now corrupted/odd-length blobs return None instead of raising, and the binary format is consistent across machines.
Parallelize sequential synchronous blocking HTTP calls in
`_fetch_upstream_versions` using `asyncio.to_thread` and `asyncio.gather`.
This reduces execution time significantly when fetching multiple artifacts.

Baseline execution time for 20 artifacts dropped from ~2.0s to ~0.3s.

Moved imports to top level. Verified with reproduction script.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant