Skip to content

Fix/0.7.1 security - #76

Draft
irzhywau wants to merge 339 commits into
upstream/0.7.1-devfrom
fix/0.7.1-security
Draft

irzhywau wants to merge 339 commits into
upstream/0.7.1-devfrom
fix/0.7.1-security

Conversation

@irzhywau

@irzhywau irzhywau commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Part of #83.

andersalm and others added 21 commits September 17, 2026 13:31
Home keeps dataset.route across an iframe document reload. The new
document must handshake ready again so Home can raise the room.

Verification:
  node scripts/home-agent-shell-smoke.mjs  PASS
  node scripts/home-entropy-check.mjs      PASS
  git diff --check                         clean
Kubo add of a directory now uses the same CID flags as directory_hash so a
complete local object keeps one CID. A bounded local miss waits 100ms
instead of 1ms so a Ready backend can still return a 64 KiB hit.

Verification:
  cargo test --manifest-path capsules/ipfs-provider/Cargo.toml bounded  PASS (6)
  cargo fmt --manifest-path capsules/ipfs-provider/Cargo.toml -- --check
  git diff --check                                                     clean
A pin miss now imports a complete local object directory, announces the
replica, and restores those replicas when Carrier comes online. Fetch
receipts name the authenticated holder DID. Non-index files use a closed
range from the signed object size; max_bytes stays the whole-index bound.

Verification:
  cargo test -p elastos-server --lib content_ensure_imports_complete_local_object_when_pin_fails
  cargo test -p elastos-server --lib content_restore_imports_complete_local_objects
  cargo test -p elastos-server --lib content_fetch_rejects_max_bytes_for_a_non_index_path
  cargo test -p elastos-server --lib fetch_model_part_requires_a_declared_range
  cargo test -p elastos-server --lib carrier_availability
  cargo test -p elastos-server --lib live_source_bootstrap_ticket
  cargo test -p elastos-server --bin elastos live_source_ticket_rejects
  (cd elastos && cargo fmt --all -- --check)
  git diff --check
Install and fetch strip group/other write from each install_path
directory under the data dir. Identity and verification stay read-only.
Verification derives the receipt bundle root from configured
install_path so a nested binary_path such as bin/llama-server still
matches the receipt. Private activation stays on debug.

Verification:
  cargo test -p elastos-server --lib verified_local_model_engine_accepts_a_nested_binary_path
  cargo test -p elastos-server --lib group_writable
  cargo test -p elastos-server --lib protect_engine_parents_rejects_symlink
  python3 scripts/fetch/fetch-model-smoke.py
  git diff --check
The Chat / Build / Studio bar above the transcript (plus Copy conversation)
is removed. The same data-assistant-mode buttons now live in the Sash
sidebar: Chat|Build as the URUX segmented control, Studio as a nav row
between Home and Settings. Anders' typed controller, workspace fields and
string gates are unchanged.

UI ≠ authority: a mode control is visible only when the Runtime backs it.
Build is a saved label today (no run reads it), so the segment stays hidden
behind MODE_CAPABILITY. Studio appears once offers_list advertises an
image.generate or video.generate offer (eligibleStudioOffers, exported from
assistant.js). A session saved in a mode the Home no longer backs opens as
chat unless it still owns an active Studio run. Because the segment is
hidden, the Studio row toggles back to chat.

Copy conversation is dropped; per-message and code-block copy in the
transcript remain.

Gates: convergence smoke asserts honest absence on the text-only fixture;
shell smoke bans the bar, the copy button, and requires capability gating.

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit d6fb946)
The context menu and its submenus were hardcoded to a light fill and ink,
so they rendered white in dark mode. They now use --menu-fill (the same
fill Home GUI's menus use), --ink, --muted and --line, with a light
override on data-el-theme="light".

The shell grid reserved a 10px column for the sidebar resizer, which
showed as a strip of --bg between the sidebar and the list. The column is
now 0px and the resizer overlays the seam, so the panes sit flush with
only the hairline between them. Resize math is delta-based and unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 1a9e86a)
The top-edge snap target locked a dragged window into the maximized
state. Maximize stays on the traffic-light button; side and corner tiles
and the drag-to-Spaces gesture are unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 2b7e561)
style.css swaps the menu-bar and About logos to ./elastos-logo-ink.svg
under data-el-theme="light", but the asset was not carried across when
the shell chrome was ported (01b3b1b), so Light and Auto-on-light showed
a broken image. Restored byte-for-byte from a56b187: the same glyph and
brand gradients, wordmark lettering in #1d2438 (the light --el-text). No
inversion, no colour change to the brand mark.

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit 2d062ff)
A saved Studio session reopens once the boot offers read confirms an
image or video offer. The reopen now belongs to the session it was saved
in and lasts only while the person has chosen nothing else. Selecting a
chat, typing in the composer or a turn that is still running keeps the
current view, so a late offers response never switches another chat into
Studio or hides its composer.

The mode guard now reads the active session's saved turn record through
unresolvedModelTurn, the same authority the harness consults before it
accepts a new turn. The streamed canonical record it compared before
carries no turn identity or state, so that guard never held.

Verification:

    BRAVE_BIN=... node scripts/assistant-studio-modes-browser-smoke.mjs
    node scripts/home-agent-shell-smoke.mjs
    node scripts/home-entropy-check.mjs

The smoke fails on the previous assistant-modes.js at each of the three
intent scenarios ('studio' !== 'chat') and passes here.

Co-authored-by: Anders <andersalm@users.noreply.github.com>
Studio availability was read once at boot. A failed or empty first read
kept the Studio row hidden for the rest of the window, and a restored
active Studio run opened the panel while both its row and the hidden
Chat|Build segment left no way back to Chat.

fetchModelOffers now reports each latest successful read on the window
(assistant:model-offers). The mode controls apply that payload, so the
chat menu's "Refresh models" and the liveness probes refresh Studio
availability through the read they already perform. The Studio row stays
while Studio is open or the current session's Studio run is unsettled, so
the row is always the way back to Chat; it hides again once Studio is
closed with no offer and no unsettled run.

Verification:

    BRAVE_BIN=... node scripts/assistant-studio-modes-browser-smoke.mjs
    node scripts/home-agent-shell-smoke.mjs
    node scripts/home-entropy-check.mjs

On the previous code the failed-then-recovered scenario times out with
the Studio row still hidden and the restored-run scenario finds the row
hidden while Studio is open.

Co-authored-by: Anders <andersalm@users.noreply.github.com>
Typing in the harness composer scheduled no workspace save. A draft was
written only when a later action (mode change, session switch, run
event, attachment) scheduled one, and a window closed after typing lost
the text. The composer input now joins the same debounced save that
attachments already use.

This also makes the convergence smoke deterministic. Its two-page phase
types into the first window after the second window has bumped the
revision and waits for that draft to be saved. On the base the Build,
Studio and Chat clicks just before that phase scheduled saves whose
debounce and merge cascade carried the typed text; once those controls
became capability-gated and the clicks were removed, nothing scheduled
the save and the phase timed out at "first window save".

Verification:

    BRAVE_BIN=... node scripts/assistant-convergence-browser-smoke.mjs
    BRAVE_BIN=... node scripts/assistant-studio-modes-browser-smoke.mjs
    BRAVE_BIN=... node scripts/model-selection-browser-smoke.mjs
    node scripts/home-entropy-check.mjs

Co-authored-by: Anders <andersalm@users.noreply.github.com>
Runtime identity and coords stay unpublished at /capsule-data. Admitted public capsule files stay reachable. Serve no longer prints session tokens.
A coords-holding local process could publish, unpublish, or ensure
availability with only a shell bearer. Those Write operations now
need an X-Capability-Token bound to the content or availability
resource.
Serve constructed an in-memory capability store, so revoke_all
vanished after a process restart. The serve path now uses the
existing with_persistence store at capability_store.
load_or_generate used write-then-chmod and followed a signing_key
symlink. The writer now creates the key exclusively with O_NOFOLLOW
and leaves a planted target unwritten.
Home room snapshots and revoke actions carried the guest bearer
token. They now use the public session id, and room summary JSON
omits the token field.
Setup rebuilt Runtime from a stale cache and accepted a group-writable
media-tools overlay. It now consumes optional receipt-bound binaries
and requires an owner-only ffmpeg/ffprobe directory.
The Now checkpoint still described later slices as uncommitted. It now
matches the six committed slices, the accepted 61780 candidate journey,
and the partial Linux review of the parent draft.
prepare-release --locked failed because 71958e9 added libc to elastos-runtime without updating this path-dependent lock.
Public 0.7.1 needs matching aarch64-darwin and x86_64-linux artifacts. Keep aarch64-linux absent so an unsupported host fails closed instead of receiving a mismatched binary.
Keep TASKS and state on the live 0.7.1 darwin+linux head, the isolated Mac install journey, and the public MetadataRead Get blocker.
@irzhywau
irzhywau added this pull request to stack #77 September 29, 2026 11:16
@irzhywau irzhywau added this to the 0.7.1 milestone Sep 29, 2026
@SashaMIT
SashaMIT removed this pull request from stack #77 September 29, 2026 15:50
@andersalm

Copy link
Copy Markdown
Contributor

@irzhywau head 5435597 is already in both main and develop (git merge-base --is-ancestor).
Nothing left to merge: please close.

@andersalm

Copy link
Copy Markdown
Contributor

This PR is superseded by #140 / #309.
Please close it when convenient; its retained work continues there.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants