Skip to content

feat(facade): rebuild, app/project guards on update and delete_by_ids (1.3.0) - #32

Merged
dani1005 merged 2 commits into
v1from
feat/facade-rebuild
Nov 20, 2026
Merged

dani1005 merged 2 commits into
v1from
feat/facade-rebuild

Conversation

@dani1005

Copy link
Copy Markdown
Member

Facade for 1.3.0-rc4 (engine release-20261102_v11, live in prod).

What

  • update() / delete_by_ids() take optional app_id / project_id guards (engine !277). A memory outside that app / project is refused like a missing one: update gives a 404, delete_by_ids skips it. They are never filled from the client's defaults, the same as user_id, so existing callers keep the id-only behaviour.
  • New rebuild(), rebuild_status() and rebuild_wait() for /memory/rebuild (engine !287). Deletes are now permanent and leave the profile, session summaries and skills stale until the caller rebuilds.
    • rebuild() uses the client's scope, like delete().
    • rebuild_wait() polls with the same backoff as purge_wait(). It raises on failure, with the job on .job. It raises a clear ValueError when there is no job (nothing_to_do / dry_run return job_id=None).
  • Docs:
    • delete() / delete_by_ids() say deletes are permanent, and describe rebuild_required / targets.
    • context() mentions the optional answer mode, which is off in Cloud.
    • The README's data-control bullet covers this.

Verification

  • pytest tests: 90 passed against the generated 1.3.0-rc4 package (sdk-factory !17, pipeline 3095622358).
  • Live against prod Cloud with the rc4 build and test users, all cleaned up:
    • delete_by_ids(..., app_id=<other app>) → deleted: 0.
    • Same app → deleted: 1, with rebuild_required/targets present.
    • rebuild(dry_run=True) / rebuild() → nothing_to_do for an owner with no profile. That is by design: the engine's _plan_profile skips a missing profile even with force, and the docstring says so.
    • rebuild_status(<unknown>) → 404 not_found.
    • A full rebuild job isn't exercised live: it needs an owner that already has a profile. The unit tests cover polling, failure, timeout and a missing job.

Order

Draft until the generated sdk/v1.3.0-rc4 PR (from sdk-factory's release pipeline) is merged into v1. This branch imports RebuildInput / RebuildStatusInput, which only exist after that.

🤖 Generated with Claude Code

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: include the generated 1.3.0-rc4 SDK surface required by this facade.

I reviewed the full diff, the surrounding facade and generated API/model code, existing callers and docs, relevant history, backward compatibility, test changes, and the facade/generated-layer architecture. I found no AGENTS.md, CLAUDE.md, or CONTEXT*.md guidance in the repository. The tests were extended rather than weakened (106 added lines, no deletions), but pytest -q fails during collection because EverOS is no longer importable; the Python 3.12 and 3.14 CI jobs report the same failure. The missing generated surface is the blocking issue described inline.

Comment thread everos_cloud/client.py
PurgeConfirmInput,
PurgeRequestData,
PurgeRequestInput,
RebuildInput,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: include the generated 1.3.0-rc4 SDK surface required by this facade.

This revision imports RebuildInput / RebuildStatusInput, but neither model is present or exported, and MemoryApi has neither rebuild endpoint. Because everos_cloud.__init__ suppresses the resulting internal ImportError, from everos_cloud import EverOS fails outright and pytest -q stops at collection. The same missing generation also means the current UpdateInput and DeleteByIdsInput models have no app_id / project_id fields, so Pydantic ignores those new kwargs and the advertised guards never reach the wire. Please include the required generated contract/client changes in this revision.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both reviews were of earlier heads (6d14d87, a4f5826), which were cut before the generated SDK landed. The branch now sits on v1 after #33 (3c2c08e chore(sdk): generate 1.3.0-rc4 from contract 2.0.0), and the current head is 3a246c2. No code change was needed.

Checked on 3a246c2:

  • RebuildInput and RebuildStatusInput exist (everos_cloud/models/rebuild_input.py, rebuild_status_input.py). MemoryApi.rebuild_memory is in everos_cloud/api/memory_api.py.
  • UpdateInput and DeleteByIdsInput both declare app_id / project_id and list them in __properties, so the guards are serialized.
  • In a clean Python 3.12 venv, from everos_cloud import EverOS imports. pytest -q passes 291 tests, and pytest -q tests passes 91.
  • The CI run on 3a246c2 passed: test (3.12), test (3.14) and build.

— automated follow-up by Dani's Claude agent

@gloryfromca gloryfromca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: include the generated 1.3.0-rc4 SDK surface required by this facade.

I reviewed the new commit and the full branch diff, including repository guidance (none found), surrounding generated models/API code, callers and documentation, relevant history, backward compatibility, test changes, and the facade/generated-layer boundary. The new rebuild_wait(client.rebuild(...)) behavior and the add/flush timing documentation introduce no additional finding, and tests were only added, not weakened. However, the existing generated-SDK blocker remains unresolved on this head: pytest -q still fails during collection because EverOS cannot be imported, matching both current CI matrix failures. The original thread remains open.

dani1005 and others added 2 commits November 20, 2026 14:59
… (1.3.0)

- update() / delete_by_ids() take optional app_id / project_id guards
  (engine !277): a memory outside that app / project is refused like a
  missing one. Never filled from the client's defaults, so existing callers
  keep the id-only behaviour.
- rebuild(), rebuild_status(), rebuild_wait() for the new /memory/rebuild
  (engine !287): deletes are now permanent and leave the profile, session
  summaries and skills stale until the caller rebuilds. rebuild_wait()
  explains a missing job_id (nothing_to_do / dry_run) instead of failing in
  model validation.
- delete() / delete_by_ids() docs: permanent, rebuild_required / targets.
  context(): mention the optional answer mode.

Needs the 1.3.0-rc4 generated models (RebuildInput, RebuildStatusInput).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lush notes

- rebuild_wait(client.rebuild(...)) works directly, like purge_confirm
  takes the purge_request() result; a job_id string still works.
- rebuild(): say what it costs (extraction metered, 429 once the quota is
  exhausted, size it with dry_run) and to take the owner from the session.
- add() / flush(): a flush right after a queued add can run before the
  write lands and extract nothing; add with async_mode=False first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dani1005
dani1005 force-pushed the feat/facade-rebuild branch from a4f5826 to 3a246c2 Compare November 20, 2026 19:59
@dani1005
dani1005 marked this pull request as ready for review November 20, 2026 19:59
@dani1005
dani1005 merged commit 0b9c0e3 into v1 Nov 20, 2026
3 checks passed
@dani1005
dani1005 deleted the feat/facade-rebuild branch November 20, 2026 20:00
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.

2 participants