fix: sealed peer sync smoke + clearer approval denials (0.9.18)
CLI/Docker assert AEAD sync; status shows sealed channel; headless denials no longer pretend the user refused. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+41
-2
@@ -247,7 +247,27 @@ int cst_parliament_cli_peer_listen(int port, const char *instance_id) {
|
||||
os_net_close(ls);
|
||||
return 1;
|
||||
}
|
||||
printf("peer_ok remote=%s host=%s\n", sess.remote.instance_id, sess.host);
|
||||
printf("peer_ok remote=%s host=%s sealed=%d\n", sess.remote.instance_id,
|
||||
sess.host, sess.sealed);
|
||||
fflush(stdout);
|
||||
{
|
||||
cst_peer_sync_bundle_t local = {0};
|
||||
cst_parliament_meta_t m;
|
||||
memset(&m, 0, sizeof(m));
|
||||
(void)cst_parliament_load(&m);
|
||||
local.revision = m.revision;
|
||||
snprintf(local.parliament_id, sizeof(local.parliament_id), "%s",
|
||||
m.parliament_id);
|
||||
snprintf(local.project_id, sizeof(local.project_id), "%s", m.project_id);
|
||||
snprintf(local.chair_instance, sizeof(local.chair_instance), "%s",
|
||||
m.chair_instance);
|
||||
local.context = cst_parliament_context_get();
|
||||
if (cst_peer_sync(&sess, &local, 15000, err, sizeof(err)) != 0)
|
||||
fprintf(stderr, "peer_sync failed: %s\n", err);
|
||||
else
|
||||
printf("peer_sync rev=%lu sealed=1\n", local.revision);
|
||||
free(local.context);
|
||||
}
|
||||
cst_peer_close(&sess);
|
||||
os_net_close(ls);
|
||||
return 0;
|
||||
@@ -274,7 +294,26 @@ int cst_parliament_cli_peer_dial(const char *host, int port,
|
||||
fprintf(stderr, "dial/handshake failed: %s\n", err);
|
||||
return 1;
|
||||
}
|
||||
printf("peer_ok remote=%s\n", sess.remote.instance_id);
|
||||
printf("peer_ok remote=%s sealed=%d\n", sess.remote.instance_id, sess.sealed);
|
||||
fflush(stdout);
|
||||
{
|
||||
cst_peer_sync_bundle_t local = {0};
|
||||
cst_parliament_meta_t m;
|
||||
memset(&m, 0, sizeof(m));
|
||||
(void)cst_parliament_load(&m);
|
||||
local.revision = m.revision;
|
||||
snprintf(local.parliament_id, sizeof(local.parliament_id), "%s",
|
||||
m.parliament_id);
|
||||
snprintf(local.project_id, sizeof(local.project_id), "%s", m.project_id);
|
||||
snprintf(local.chair_instance, sizeof(local.chair_instance), "%s",
|
||||
m.chair_instance);
|
||||
local.context = cst_parliament_context_get();
|
||||
if (cst_peer_sync(&sess, &local, 15000, err, sizeof(err)) != 0)
|
||||
fprintf(stderr, "peer_sync failed: %s\n", err);
|
||||
else
|
||||
printf("peer_sync rev=%lu sealed=1\n", local.revision);
|
||||
free(local.context);
|
||||
}
|
||||
cst_peer_close(&sess);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user