Skip to content

fix(seekdb): stabilize diagnostics and schema compatibility checks - #2518

Open
PsiACE wants to merge 10 commits into
masterfrom
codex/fix-seekdb-ci-diagnostics
Open

PsiACE wants to merge 10 commits into
masterfrom
codex/fix-seekdb-ci-diagnostics

Conversation

@PsiACE

@PsiACE PsiACE commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Which issue or RFC does this PR close?

Follow-up to #2168, #2458 and #2394.

Rationale for this change

Repeated native watchdog dumps can segfault during SeekDB tests. Schema compatibility checks also copy complete inventories for each recovery prefix, adding avoidable work near test deadlines.

What changes are included in this PR?

  • Replace unsafe watchdog dumps with synchronous Python stack sampling in SeekDB test entrypoints. Preserve child exit codes, signals and hard deadlines.
  • Compare required managed columns, indexes and normalized CHECK definitions without copying unrelated extension metadata. Preserve input evidence and compatibility semantics.
  • Retain regression coverage for vanished /proc tasks while allowing permission/resource errors to propagate; master already contains the narrow ESRCH handling.
  • Integrate master 7fef43d6, preserve its schema-review history and Source locator migration declaration, and recompute the managed persistence digest. Preserve the migration-connection-scoped replay observer and assert exact Source sequence locators in Atomic Memory recovery acceptance. Shared website, Twine, license-install and ACL fixes come from master.

Are there any user-facing changes?

No API, stored-schema, migration-resource or supported-upgrade changes. No timeout, retry budget or acceptance requirement is relaxed.

How was this change tested?

  • Focused upgrade gate, MySQL schema compatibility, Candidate replay, HTTP resource limits and schema equivalence checks: 245 passed, 10 skipped.
  • Atomic Memory reconciliation/retry acceptance: 11 passed, including Source sequence locators, restart and retained history.
  • Real embedded SeekDB: both test_seekdb_legacy_choice_preserves_old_data_and_separates_new_database and test_seekdb_legacy_migration_cli_preserves_json_with_sql_echo passed in a 101.23-second run, with POWERCONTEXT_TEST_BOOTSTRAP_SEEKDB=1 and faulthandler_timeout=0. Existing process deadlines remained active.
  • make check: passed, including hooks, type checks and schema-review validation.

The focused native checks do not establish the full Python/backend or installed-release upgrade matrix. OceanBase and complete release acceptance remain for CI; the support policy stays upgrade-required.

AI usage statement

OpenAI Codex assisted implementation and review. Earlier repairs used local Bub with magpie:group/deepseek-flash at high reasoning effort. Codex directly performed the current integration, reviewed the combined schema contract and reran both focused and native acceptance; Bub was not used for this update.

@PsiACE
PsiACE marked this pull request as ready for review November 6, 2026 08:07
Copilot AI balanced review requested due to automatic review settings November 6, 2026 08:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Native acceptance is still incomplete on 94d99fd9, so I am withholding approval pending validation.

On Linux with Python 3.11.13 and the locked pylibseekdb==1.4.0.post2, test_seekdb_legacy_choice_preserves_old_data_and_separates_new_database failed both permitted attempts: the first exceeded the unchanged 360-second process deadline; the second exited with TimeoutError from the existing 300-second scenario timeout while entering the explicitly selected powercontext Server lifespan (seekdb_legacy_choice.py:179). Synchronous diagnostic dumps were retained. The companion legacy CLI scenario passed.

Reproducer after the locked SeekDB/Code install:

POWERCONTEXT_TEST_BOOTSTRAP_SEEKDB=1 .venv/bin/python -m pytest -q -o faulthandler_timeout=0 tests/e2e/test_database_bootstrap.py -k 'legacy_choice or legacy_migration_cli'

The host was busy and I have not replayed this native scenario on base, so this is an acceptance limitation, not a confirmed regression introduced by this patch. The schema comparison checks found no behavioral difference or input mutation, and the change adds no database tables or public interfaces.

Current CI also stopped at the unchanged /proc/<pid>/stat process-exit race in test_upgrade_release_gate.py, leaving the native jobs skipped. Please establish passing native/CI evidence for this head, and distinguish the remaining startup timeout from any baseline or environment issue before merging.

Keep master's schema-review history and append this branch's MySQL
inventory statement; recompute the persistence digest for the merged
managed inputs.
/proc/<pid>/stat can report ESRCH when the task exits between path
resolution and read, which made the parent-term cancellation test flaky.
Handle ProcessLookupError alongside FileNotFoundError only; permission
and resource-exhaustion errors still propagate.
Copilot AI balanced review requested due to automatic review settings November 6, 2026 16:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

The pinned skywalking-eyes header action installs with `make install`,
whose Makefile targets /usr/local/bin and ignores the unprivileged copy
failure, so its next step cannot resolve license-eye. Pass the supported
INSTALL_DIR override pointing at runner.temp and publish that directory
on GITHUB_PATH. The license check and its inputs are unchanged.
Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Next derives its default build worker count from the visible CPU count, so
page-data collection peak memory scaled with host CPUs and the check-website
job was OOM-killed (exit 137) on the internal runner. Cap it at 2 so the
build fits the runner's memory limit. Every page is still rendered.
@PsiACE
PsiACE requested a review from zhanghuidinah as a code owner November 6, 2026 17:58
Copilot AI balanced review requested due to automatic review settings November 6, 2026 17:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

…ult ACLs

The case directory is a temporary directory, and on a runner whose temp root
carries a default POSIX ACL that entry is inherited by every hook-created
subdirectory and file. A default ACL overrides the umask, so the hooks' own
`$HOME/.local`, `$HOME/.local/state/powercontext`, and diagnostics file were
recorded as 775/664 instead of the characterized 755/644 even though each hook
process already starts with umask 0o022.

Remove the inherited default entry at the case root before any hook runs; it is
created before the first step, so modes below it then follow the umask alone.
Only the root needs handling, and private 0600/0700 expectations are unchanged.
The attribute is Linux-specific, so other hosts are left alone, and an
unexpected removal error still fails the case. Every other fixture field was
identical in the failing CI run.
Copilot AI balanced review requested due to automatic review settings November 6, 2026 18:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@hidb4ai hidb4ai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Re-reviewed a7f24f8d. Both legacy SeekDB bootstrap scenarios now pass in the PR's CI merge build, and the /proc race fix preserves propagation of unrelated errors. No new database tables or public interfaces were added.

Approval remains withheld for integration and validation blockers:

  • Merging into current master 9697d5f2 produces conflicts in release/upgrade-support.json and tests/test_upgrade_release_gate.py (independently reproduced with git merge-tree). Preserve both sides' changes and recompute the persistence declaration against the combined managed sources.
  • The website job still exits 137 during page-data collection with two workers. Upgrade preparation fails because the distribution checker rejects metadata version 2.5, so the installed-release matrix has no passing result. These failures need resolution or demonstrated infrastructure attribution and successful reruns.

The remaining SeekDB 3.11 shard was interrupted by runner shutdown; it provides incomplete native evidence. I found no additional runtime correctness regression in the changed code. Please reconcile master and obtain passing required checks on the resulting head before merging.

Comment thread website/next.config.mjs Resolved
Copilot AI balanced review requested due to automatic review settings November 7, 2026 18:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Copilot AI balanced review requested due to automatic review settings November 8, 2026 14:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 04:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Copilot AI balanced review requested due to automatic review settings November 9, 2026 06:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

@AlexStocks AlexStocks added the 1.6.0 v1.6.0 release tracking label Nov 9, 2026

This branch has not been deployed

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

Labels

1.6.0 v1.6.0 release tracking

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants