Skip to content

feat(memory-server): dual-write generic task columns#249

Merged
Hyperkid123 merged 2 commits into
OpenShift-Fleet:masterfrom
Hyperkid123:feat/RHCLOUD-48377
Jun 17, 2026
Merged

feat(memory-server): dual-write generic task columns#249
Hyperkid123 merged 2 commits into
OpenShift-Fleet:masterfrom
Hyperkid123:feat/RHCLOUD-48377

Conversation

@Hyperkid123

Copy link
Copy Markdown
Collaborator

Summary

Stage 2 of the generic task system migration (RHCLOUD-48377).

Every write path now populates both the old (jira_key, pr_number, pr_url) and new (external_key, source_type, source_url, artifacts) columns simultaneously. No read path changes, no bot behavior changes, no CLAUDE.md changes.

Changes

  • New artifacts.py — shared build_artifacts() helper + JIRA_BASE_URL constant, extracted from migration
  • Task toolstask_add, task_update, bot_status_update all dual-write new columns
  • RAG toolsmemory_store dual-writes external_key/source_type
  • Slack toolsslack_notify dual-writes external_key/source_type
  • API layerapi_costs_add, api_memory_upload, api_bot_status_update dual-write new columns
  • Pydantic modelsTask and Memory models include new fields in responses
  • Lint fixes — removed dead code and unused imports across test + migration files
  • 11 new tests covering all dual-write paths

What this does NOT change

  • No new MCP tool parameters (bot still calls task_add(jira_key=...))
  • No new REST API parameters
  • No read path changes (queries still use jira_key WHERE clauses)
  • No CLAUDE.md / bot behavior changes

Test plan

  • All existing tests pass (migration, cycle-runs)
  • 11 new dual-write tests pass against Postgres sidecar
  • ruff check + ruff format clean
  • CI pipeline green

RHCLOUD-48377

Hyperkid123 and others added 2 commits June 17, 2026 09:49
… paths

RHCLOUD-48377 — Stage 2 of generic task system migration.

Every write path now populates both old (jira_key, pr_number, pr_url) and
new (external_key, source_type, source_url, artifacts) columns simultaneously.

- Extract shared build_artifacts() + JIRA_BASE_URL to artifacts.py
- task_add: derives external_key/source_type/source_url/artifacts from jira_key
- task_update: rebuilds artifacts when PR fields or metadata.prs change
- bot_status_update: sets external_key/source_type in singleton + multi-instance
- memory_store: sets external_key/source_type from jira_key
- slack_notify: sets external_key/source_type from jira_key
- api_costs_add: sets external_key/source_type on cycles INSERT
- api_memory_upload: sets external_key/source_type on memories INSERT
- api_bot_status_update: sets external_key/source_type on bot_status UPDATE
- Add Pydantic model fields for new columns (Task, Memory)
- Fix pre-existing lint issues (unused imports, dead code)
- Add 11 dual-write tests covering all write paths

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
RHCLOUD-48377
Proper Python package structure so relative imports work.
- git mv src/ → bot_memory_server/
- Add [build-system] + setuptools config to pyproject.toml
- Update all test imports from src.* to bot_memory_server.*
- Remove sys.path hacks from test files
- Update Dockerfile, Makefile, docker-compose, vite config
- Update .gitignore paths for dashboard build output

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Hyperkid123 Hyperkid123 merged commit a7c52aa into OpenShift-Fleet:master Jun 17, 2026
6 checks passed
@Hyperkid123 Hyperkid123 deleted the feat/RHCLOUD-48377 branch June 17, 2026 08:55
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