Skip to content

feat(runtime): current-upstream shared auth and result-metadata convergence - #5

Closed
cermm wants to merge 53 commits into
review-base-358-380-afc54from
legacy-convergence-358-380-afc54
Closed

feat(runtime): current-upstream shared auth and result-metadata convergence#5
cermm wants to merge 53 commits into
review-base-358-380-afc54from
legacy-convergence-358-380-afc54

Conversation

@cermm

@cermm cermm commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Repo-only CI/publication artifact for cermm/wc-infrastructure#358 and NousResearch#380.

Exact independently reviewed candidate:

  • head a7fa5fdf27b5382e8c3e4f4837605df8687940cd
  • tree 16e541a6732a099c14d4a7d06273b4848aa33520
  • parents afc54ca8060f65f918f9ff4341302db136897f19 and 21b21db0ebd82baa91b2999f2da854b6b6302e08
  • accepted stable patch-id da89c8500df9a2d5272224afeb460c8b12186a26

Independent exact review: 75 focused + 822 broad tests PASS; Ruff, compile, diff, secret and clean one-writer checks PASS. This fork-side PR is based on the exact reviewed upstream commit because the available token cannot create a NousResearch upstream PR. It does not claim upstream integration or authorize install, live auth/profile/SOUL/config mutation, canary, rollout, or issue closure.

cermm and others added 30 commits July 12, 2026 19:39
Co-authored-by: Hermes Agent <hermes-agent@local>
Co-authored-by: Hermes Agent <hermes-agent@local>
Co-authored-by: Hermes Agent <hermes-agent@local>
Hermes Agent added 23 commits July 24, 2026 20:25
…t upstream

Merge immutable feature parent b5b0dbb into pinned origin/main 2b0fb72. Resolve overlapping auth, result-metadata, database recovery, gateway/TUI, live-test, and documentation paths while preserving both accepted feature semantics and current-upstream behavior.
# Conflicts:
#	ui-tui/src/__tests__/bundleNoAsyncEsmDeadlock.test.ts
#	ui-tui/src/__tests__/cursorDriftRegression.test.ts
#	ui-tui/src/__tests__/statusRule.test.ts
#	ui-tui/src/__tests__/virtualHeights.test.ts
#	website/package.json

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a7fa5fdf27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +514 to +515
_merge_section(merged, source, "providers", conflict_policy)
_merge_section(merged, source, "credential_pool", conflict_policy)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve suppression state during shared migration

When a legacy profile has suppressed_sources entries, such as an env:OPENROUTER_API_KEY source the user explicitly removed, apply_shared_migration() copies only providers and credential_pool. After the profile switches to shared authority, the suppression is absent from the selected store, so load_pool() can reactivate that credential from the environment. Migrate or explicitly resolve conflicts for this top-level auth control state rather than silently undoing credential removals.

AGENTS.md reference: AGENTS.md:L84-L87

Useful? React with 👍 / 👎.

Comment on lines +446 to +451
locked_paths = sorted(
{*paths, *(home / "config.yaml" for home in homes)},
key=lambda path: os.fsencode(str(path.resolve(strict=False))),
)
with _auth_transition_lock(), _auth_store_locks(
locked_paths, transaction_target=target

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Coordinate config writers during auth migration

Adding each config.yaml to _auth_store_locks() only acquires the derived config.lock, but normal writers such as save_config_value() and the dashboard config endpoints do not use that lock. If one writes after the dry-run precondition check, either migration can overwrite the concurrent setting or the concurrent stale write can remove auth.authority: shared; the journal may then record that unintended file as the committed postcondition. Use synchronization shared by all config writers or revalidate the intended config bytes before committing.

AGENTS.md reference: AGENTS.md:L84-L87

Useful? React with 👍 / 👎.

Comment thread hermes_cli/backup.py
Comment on lines +1753 to +1758
if auth_src.is_file() and not _too_large(auth_src, "auth authority"):
encrypted_result = _encrypt_auth(
auth_src.read_bytes(),
auth_passphrase,
)
if encrypted_result is not None:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Reject quick snapshots when requested auth is omitted

With --quick --auth-mode include-encrypted, a missing or oversized authority leaves encrypted_result as None, and encryption/read failures are merely logged below. The function still writes a manifest with no auth authority, returns a snapshot ID, and the CLI reports that the snapshot was created successfully. An operator can therefore rely on an explicitly requested credential backup that cannot restore credentials; fail the snapshot and remove the partial directory instead.

AGENTS.md reference: AGENTS.md:L84-L87

Useful? React with 👍 / 👎.

Comment thread cli.py
Comment on lines +17976 to +17980
if (
getattr(cli, "result_meta_file", None)
or getattr(cli, "result_meta_fd", None) is not None
):
cli._publish_result_metadata(result)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Publish interruption metadata on KeyboardInterrupt

Metadata is published only after run_conversation() returns normally, while the immediately preceding KeyboardInterrupt branch exits with code 130. If a parent requests either metadata transport and interrupts an in-flight query, it receives an absent sidecar or FIFO EOF rather than the schema's interrupted: true result, preventing consumers from distinguishing this supported outcome through the requested contract. Publish a conservative interrupted frame before exiting.

AGENTS.md reference: AGENTS.md:L80-L83

Useful? React with 👍 / 👎.

@cermm

cermm commented Aug 16, 2026

Copy link
Copy Markdown
Owner Author

Evidence-preserving supersession closure

Pre-close readback for #5: state=OPEN; updatedAt=2026-07-31T17:20:23Z; headRefOid=a7fa5fdf27b5382e8c3e4f4837605df8687940cd; baseRefOid=afc54ca8060f65f918f9ff4341302db136897f19; mergeable=MERGEABLE; mergeStateStatus=UNSTABLE.

This stale PR is superseded by merged PR #10 (#10), which preserves the reviewed producer-bound NousResearch#358 evidence, and merged PR #17 (#17), which delivered the NousResearch#380 shared-auth repair. Merged PR #16/current main is e0c3e1b.

Closure does not prove NousResearch#358 integration. NousResearch#358 remains OPEN and not close-ready; current repair/review continues on t_9be14185 / the result-metadata FD path, followed by required protected canary evidence. This PR is closed as superseded without merge, force-push, branch deletion, or ref alteration. No issue closure, install, rollout, or live Hermes/SOUL/profile mutation is authorized.

@cermm cermm closed this Aug 16, 2026
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