NX01: Minimal split of fault and zillala sitra reporting code
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 39s

This commit is contained in:
Willem Cazander 2026-03-24 10:56:33 +01:00
parent 35d913d6bb
commit 99bf95a82a
9 changed files with 75 additions and 29 deletions

View file

@ -50,8 +50,9 @@ public class BabelTest {
// ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᒻᐤᣔᑊᐣᓫᣗ // ᒢᐩᐩ.ᑊᑉᒻᣔᔆᔆ.ᒻᐤᣔᑊᐣᓫᣗ
// ᒢᐩᐩ.ᒃᣔᔆᑊᒼ.ᔆᐪᓫᣖ.ᘁᣔᒻᓑᓫ // ᒢᐩᐩ.ᒃᣔᔆᑊᒼ.ᔆᐪᓫᣖ.ᘁᣔᒻᓑᓫ
// ᒢᐩᐩ.ᒡᒢᣔᣗᣖ.ᒼᐤᣗᓫ // ᒢᐩᐩ.ᒡᒢᣔᣗᣖ.ᒼᐤᣗᓫ
// ᒢᐩᐩ.ᒡᒢᣔᣗᣖ.ᣘᣔᓑᒻᐪ // ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ
// ᒢᐩᐩ.ᒡᒢᣔᣗᣖ.ᣘᣔᓑᒻᐪ.ᑊᐣᓑᒼᑊᑉ // ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.ᑊᐣᓑᒼᑊᑉ
// ᒢᣘᐧᣟ.ᑊᑉᒻᣔᔆᔆ.ᣘᣔᓑᒻᐪ.ᙆᑊᒻᒻᣔᒻᣔ
// ᒢᐩᐩ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.ᔆᒼᐤᣖᑊᒼ // ᒢᐩᐩ.ᒡᒢᣔᣗᣖ.ᔿᣔᣕᑊᣘᓫᔆᐪᐤᣗ.ᔆᒼᐤᣖᑊᒼ
// ᒢᐩᐩ.ᐪᓫᕽᐪ.ᔆᐪᣗᑊᣕᕐ.ᣔᑊᐣᓑᒻᐪ (jpp 18 bit version of PrimordialOctalOrangeString) // ᒢᐩᐩ.ᐪᓫᕽᐪ.ᔆᐪᣗᑊᣕᕐ.ᣔᑊᐣᓑᒻᐪ (jpp 18 bit version of PrimordialOctalOrangeString)
// ᒢᐩᐩ.ᐪᓫᕽᐪ.ᔆᐪᣗᑊᣕᕐ.ᓑᣕᣳᒼᐤᒄᓫ // ᒢᐩᐩ.ᐪᓫᕽᐪ.ᔆᐪᣗᑊᣕᕐ.ᓑᣕᣳᒼᐤᒄᓫ

View file

@ -69,6 +69,7 @@ import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlower;
import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlowerAnther; import love.distributedrebirth.nx01.redsea.hyper.model.HyperFlowerAnther;
import love.distributedrebirth.nx01.redsea.hyper.local.HyperLocalFileSystem; import love.distributedrebirth.nx01.redsea.hyper.local.HyperLocalFileSystem;
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.fault.sitra.ZilLaLaManyfestoGrowlFactory;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX0TheMimeType;
@ -95,7 +96,7 @@ public class Java3Seed extends PrintStream {
System.err.println(e.toString()); System.err.println(e.toString());
} }
if (BassFaultAnchor.class.isAssignableFrom(e.getClass())) { if (BassFaultAnchor.class.isAssignableFrom(e.getClass())) {
System.err.println(BassFaultAnchor.class.cast(e).toStringZilLaLa()); System.err.println(ZilLaLaManyfestoGrowlFactory..buildFaultScream(BassFaultAnchor.class.cast(e)));
} }
System.exit(1); System.exit(1);
} }

View file

@ -34,10 +34,10 @@ import java.util.Map;
import java.util.Optional; import java.util.Optional;
import java.util.function.Consumer; import java.util.function.Consumer;
import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestGenerator; //import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestGenerator;
import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestSectionWhitePaper; //import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestSectionWhitePaper;
import love.distributedrebirth.nx01.warp.fault.sitra.ZilLaLaManyfestoGrowlFactory; //import love.distributedrebirth.nx01.warp.fault.sitra.ZilLaLaManyfestoGrowlFactory;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; //import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
/// Bass fault anchor (which replaces; Exception/RuntimeException) /// Bass fault anchor (which replaces; Exception/RuntimeException)
/// ///
@ -78,12 +78,19 @@ abstract public class BassFaultAnchor extends BassFaultAnchorSignalStore {
return this; return this;
} }
public class FaultSignalWhitePaper {
private FaultSignalWhitePaper() {
}
}
public final BassFaultAnchor appendOnWhitePaper(String key, String value) { public final BassFaultAnchor appendOnWhitePaper(String key, String value) {
return withSignalTrace(SitraManifestSectionWhitePaper.class, key, value); return withSignalTrace(FaultSignalWhitePaper.class, key, value);
//return withSignalTrace(SitraManifestSectionWhitePaper.class, key, value);
} }
public final BassFaultAnchor appendOnWhitePaper(Consumer<Map<String, String>> tracer) { public final BassFaultAnchor appendOnWhitePaper(Consumer<Map<String, String>> tracer) {
return withSignalTrace(SitraManifestSectionWhitePaper.class, tracer); return withSignalTrace(FaultSignalWhitePaper.class, tracer);
//return withSignalTrace(SitraManifestSectionWhitePaper.class, tracer);
} }
public final StackTraceElement[] getStackTraceWithoutSignals() { public final StackTraceElement[] getStackTraceWithoutSignals() {
@ -124,18 +131,18 @@ abstract public class BassFaultAnchor extends BassFaultAnchorSignalStore {
return result; return result;
} }
public final String toStringZilLaLa() { // public final String toStringZilLaLa() {
return ZilLaLaManyfestoGrowlFactory..buildFaultScream(toZilLaLaManyfesto(), this); // return ZilLaLaManyfestoGrowlFactory..buildFaultScream(toZilLaLaManyfesto(), this);
} // }
//
@Deprecated // @Deprecated
public final String toStringZilLaLaBase64() { // public final String toStringZilLaLaBase64() {
return ZilLaLaManyfestoGrowlFactory..buildFaultScreamBase64(toZilLaLaManyfesto(), this); // return ZilLaLaManyfestoGrowlFactory..buildFaultScreamBase64(toZilLaLaManyfesto(), this);
} // }
//
public final WarpManifestX8 toZilLaLaManyfesto() { // public final WarpManifestX8 toZilLaLaManyfesto() {
return SitraManifestGenerator..buildSignalTraceManifest(this); // return SitraManifestGenerator..buildSignalTraceManifest(this);
} // }
static public StackTraceElement[] cleanStackTrace(Throwable e) { static public StackTraceElement[] cleanStackTrace(Throwable e) {
if (e instanceof BassFaultAnchor) { if (e instanceof BassFaultAnchor) {

View file

@ -34,7 +34,7 @@ import java.util.Optional;
import java.util.Set; import java.util.Set;
import java.util.function.Consumer; import java.util.function.Consumer;
import love.distributedrebirth.nx01.warp.fault.sitra.ZilLaLaManyfestoHeader; //import love.distributedrebirth.nx01.warp.fault.sitra.ZilLaLaManyfestoHeader;
/// Bass fault anchor for storing trace signals. /// Bass fault anchor for storing trace signals.
/// ///
@ -44,10 +44,12 @@ abstract public class BassFaultAnchorSignalStore extends RuntimeException {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private final LinkedHashMap<Class<?>,Map<String, String>> traceSignals = new LinkedHashMap<>(); private final LinkedHashMap<Class<?>,Map<String, String>> traceSignals = new LinkedHashMap<>();
private final Class<?> sectionChain;
protected BassFaultAnchorSignalStore(String message, Class<?> signal) { protected BassFaultAnchorSignalStore(String message, Class<?> signal) {
super(message); super(message);
fetchTraceSignalMap(signal).put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_MESSAGE, message); sectionChain = signal;
//fetchTraceSignalMap(signal).put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_MESSAGE, message);
} }
protected BassFaultAnchorSignalStore(Exception error, Class<?> signal) { protected BassFaultAnchorSignalStore(Exception error, Class<?> signal) {
@ -69,7 +71,8 @@ abstract public class BassFaultAnchorSignalStore extends RuntimeException {
} }
} }
} }
fetchTraceSignalMap(signal).put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_ICEBERG, error.getClass().getName()); sectionChain = signal;
//fetchTraceSignalMap(signal).put(ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_ICEBERG, error.getClass().getName());
} }
protected BassFaultAnchorSignalStore(Exception error, Class<?> signal, String key, String value) { protected BassFaultAnchorSignalStore(Exception error, Class<?> signal, String key, String value) {
@ -82,6 +85,10 @@ abstract public class BassFaultAnchorSignalStore extends RuntimeException {
tracer.accept(fetchTraceSignalMap(signal)); tracer.accept(fetchTraceSignalMap(signal));
} }
public Class<?> getSectionChain() {
return sectionChain;
}
public final Set<Class<?>> getTraceSignals() { public final Set<Class<?>> getTraceSignals() {
return traceSignals.keySet(); return traceSignals.keySet();
} }

View file

@ -64,12 +64,29 @@ public enum SitraManifestGenerator {
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_THREE, SitraManifestUUIDCrematorium..burnWaterMarkThree().toString()); manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_THREE, SitraManifestUUIDCrematorium..burnWaterMarkThree().toString());
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_FOUR, SitraManifestUUIDCrematorium..burnWaterMarkFour().toString()); manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_WM_FOUR, SitraManifestUUIDCrematorium..burnWaterMarkFour().toString());
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_DATE, uuidDate); manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_UUID_DATE, uuidDate);
// TODO: redo section signal patch logic, used to be in BassFaultAnchorSignalStore, this covers most, but add trace to print it feels bad
Class<?> sectionRoot = fault.getSectionChain();
String sectionRootMsg = fault.getMessage();
Throwable faultRoot = fault.getCause(); Throwable faultRoot = fault.getCause();
if (faultRoot != null) { if (faultRoot != null) {
if (faultRoot instanceof BassFaultAnchor signalFault) {
sectionRoot = signalFault.getSectionChain();
sectionRootMsg = signalFault.getMessage();
}
Throwable faultRootPrev = faultRoot;
while (faultRoot.getCause() != null) { while (faultRoot.getCause() != null) {
faultRootPrev = faultRoot;
faultRoot = faultRoot.getCause(); faultRoot = faultRoot.getCause();
} }
if (faultRoot instanceof BassFaultAnchor signalFault) {
sectionRoot = signalFault.getSectionChain();
sectionRootMsg = signalFault.getMessage();
fault.withSignalTrace(sectionRoot, ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_ICEBERG, faultRootPrev.getClass().getName()); // redo
} }
}
fault.withSignalTrace(sectionRoot, ZilLaLaManyfestoHeader.SIGNAL_FAULT_SECTION_CHAIN_MESSAGE, sectionRootMsg); // redo
if (faultRoot != null) { if (faultRoot != null) {
manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_ROOT_ICEBERG, faultRoot.getClass().getName()); manifest.withAttribute(ZilLaLaManyfestoHeader.MAIN_FAULT_ROOT_ICEBERG, faultRoot.getClass().getName());
} }

View file

@ -31,7 +31,8 @@ package love.distributedrebirth.nx01.warp.fault.sitra;
/// ///
/// @author للَّٰهِilLצسُو /// @author للَّٰهِilLצسُو
/// @version ©Δ 仙上主天 /// @version ©Δ 仙上主天
public enum SitraManifestSectionWhitePaper { @Deprecated
/*public*/ enum SitraManifestSectionWhitePaper {
; ;
// An empty enum type is a static jvm safe locked pointer to somewhere. // An empty enum type is a static jvm safe locked pointer to somewhere.
} }

View file

@ -44,6 +44,11 @@ public enum ZilLaLaManyfestoGrowlFactory {
/// Multiple characters seen as a slug to indicate that words are eaten. /// Multiple characters seen as a slug to indicate that words are eaten.
private static final String VALUE_CUTOFF = "..."; private static final String VALUE_CUTOFF = "...";
public String buildFaultScream(BassFaultAnchor fault) {
WarpManifestX8 manifest = SitraManifestGenerator..buildSignalTraceManifest(fault);
return buildFaultScream(manifest, fault);
}
public String buildFaultScream(WarpManifestX8 manifest, BassFaultAnchor fault) { public String buildFaultScream(WarpManifestX8 manifest, BassFaultAnchor fault) {
StringBuilder buf = new StringBuilder(); StringBuilder buf = new StringBuilder();
buf.append(fault.getClass().getSimpleName()); buf.append(fault.getClass().getSimpleName());

View file

@ -30,6 +30,8 @@ package love.distributedrebirth.nx01.warp.fault;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestGenerator;
import love.distributedrebirth.nx01.warp.fault.sitra.ZilLaLaManyfestoGrowlFactory;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
@ -101,7 +103,7 @@ public class FaultSignalTraceTest {
} }
Assertions.assertNotNull(error); Assertions.assertNotNull(error);
Assertions.assertNotNull(error.getMessage()); Assertions.assertNotNull(error.getMessage());
String errorText = error.toStringZilLaLa(); String errorText = ZilLaLaManyfestoGrowlFactory..buildFaultScream(error);
//System.out.println(errorText); //System.out.println(errorText);
//System.out.println(errorText.length()); // 3185, 3433 //System.out.println(errorText.length()); // 3185, 3433
Assertions.assertNotNull(errorText); Assertions.assertNotNull(errorText);
@ -119,10 +121,14 @@ public class FaultSignalTraceTest {
} }
Assertions.assertNotNull(error); Assertions.assertNotNull(error);
Assertions.assertNotNull(error.getMessage()); Assertions.assertNotNull(error.getMessage());
WarpManifestX8 manifest = error.toZilLaLaManyfesto(); WarpManifestX8 manifest = SitraManifestGenerator..buildSignalTraceManifest(error);
String sitraText = WarpManifestorDriver.writeV2String(manifest); String sitraText = WarpManifestorDriver.writeV2String(manifest);
//System.out.println(sitraText); System.out.println(sitraText);
Assertions.assertNotNull(sitraText); Assertions.assertNotNull(sitraText);
Assertions.assertTrue(sitraText.contains("Name: love.distributedrebirth.nx01.warp.fault.FaultSignalTraceTest$SpaceA"));
Assertions.assertTrue(sitraText.contains("Fault-Section-Goal: ROCK summit"));
Assertions.assertTrue(sitraText.contains("Fault-Section-Chain-Message: The signal trace root"));
Assertions.assertTrue(sitraText.contains("Fault-Section-Chain-Iceberg: java.lang.IllegalArgumentException"));
Assertions.assertTrue(sitraText.contains("Manifest")); Assertions.assertTrue(sitraText.contains("Manifest"));
Assertions.assertTrue(sitraText.contains("SpaceB")); Assertions.assertTrue(sitraText.contains("SpaceB"));
Assertions.assertTrue(sitraText.contains("FoodSection")); Assertions.assertTrue(sitraText.contains("FoodSection"));

View file

@ -38,6 +38,7 @@ import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.http.HttpServletResponse;
import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor; import love.distributedrebirth.nx01.warp.fault.BassFaultAnchor;
import love.distributedrebirth.nx01.warp.fault.FaultStreamDelegate; import love.distributedrebirth.nx01.warp.fault.FaultStreamDelegate;
import love.distributedrebirth.nx01.warp.fault.sitra.SitraManifestGenerator;
import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver; import love.distributedrebirth.nx01.warp.manifestor.WarpManifestorDriver;
import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8; import love.distributedrebirth.nx01.warp.manifestor.manifest.WarpManifestX8;
@ -62,7 +63,7 @@ public class ZilLaLaFaultFilter extends HttpFilter {
throw error; throw error;
} }
BassFaultAnchor fault = wrap(error); BassFaultAnchor fault = wrap(error);
WarpManifestX8 report = fault.toZilLaLaManyfesto(); WarpManifestX8 report = SitraManifestGenerator..buildSignalTraceManifest(fault);
// TODO: repack and forward to UI form to inspect AND connect+send into a NOSTR // TODO: repack and forward to UI form to inspect AND connect+send into a NOSTR
// relay // relay