Commit Graph
22 Commits
Author SHA1 Message Date
julian.kiedaischandClaude Opus 5.5 1efbb8a660 feat(fls): import the e-mail programs into the editor model
The e-mail client and server of every host come into the model (core:
EmailClientConfiguration, EmailServerConfiguration, EmailMessage), from
Java's view:

- the server's accounts are those of /mailserver/konten.txt, as Java reads
  them at every simulation start; without the file those of the bean list,
  which Java would drop;
- the client's account is that of /konten.txt; without it the first of an
  older file's kontoListe, which FILIUS 2.14 no longer reads;
- messages are numbered per program in folder order, as Swift does; the
  sent folder's are sent; a date is taken only when the file gives one.

Departures from Swift: accounts and messages stay where Swift drops what
fails its checks; first and last name stay apart; a port that is no number
is the default, with a warning. On the corpus the model matches Swift's on
all 13 files; the one Swift error is named (it numbers a mailbox's messages
as their received time and writes that into the konten.txt it rewrites).

The Swift dump now carries the e-mail state, and the file system
comparison leaves out only Swift's hidden state files (and the directories
it makes for them) instead of all of /mail, /mailserver and /peer2peer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 07:36:05 +00:00
julian.kiedaischandClaude Opus 5.5 8f9930f1ff fix(fls): follow Java's formats, not Java's errors
Java stays the reference for the .fls format, but its errors are no longer
copied. The Java oracle still measures Java as it is; each deliberate
departure is named in the tests with its reason (JAVA_BUGS) and must really
depart. The corpus - what Java itself writes - still reads exactly as in
Java.

- /dns/hosts: a label may start with a digit, holds no backslash, and the
  last one is not all digits (RFC 1123, RFC 3696); A, MX and NS are read in
  any case (RFC 4343); a negative TTL is invalid, so 3600 (RFC 2181). Also
  for the e-mail server's domain.
- /mailserver/konten.txt: empty fields count (Java's StringTokenizer skips
  them and shifts the rest, so an empty password breaks the account); a
  short line alone is left out, with a warning (Java throws for the whole
  file); a message keeps an empty text or subject (Java's split loses it);
  a ";" in an unescaped subject stays in the message; CRLF lines.
- /konten.txt: the last complete line is the account, also with an empty
  address (Java takes the last line and loses the account); CRLF lines.
- Static DHCP assignments: a broken entry alone is left out (Java loses
  every entry after it).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 07:20:52 +00:00
julian.kiedaischandClaude Opus 5.5 ec5523d7c7 feat(fls): Java's view of the e-mail programs
The Java view now reads what FILIUS 2.14 keeps for its e-mail programs:
the server's domain, switch and bean accounts with their mailboxes, and the
accounts of /mailserver/konten.txt, which Java reads at every simulation
start and which so win over the bean list; the client's three folders and
address book, and its account from /konten.txt (no bean holds it).

javaEmail.ts ports the bean setters and both file readers
(stringZuListeBenutzerkonten, EmailKonto(String)); javaString.ts Java's
trim, split and StringTokenizer; javaFileSystem.ts the file lookup, now
shared with the DNS server, with the four non-ASCII units Java's
equalsIgnoreCase also takes for an ASCII letter (measured over the BMP).

Checked against Java on the corpus (the oracle dumps the e-mail state) and
on 43 account files read by EmailServer.kontenLaden and
EmailAnwendung.laden (EmailFileCases). Found: older files keep recipients
as strings in the typed lists; a getter copy of the sender is filled and
set back; one short server line makes Java throw for the whole file; a
message with an empty text is lost on reading; a broken last client line
empties the account.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 07:06:55 +00:00
julian.kiedaischandClaude Opus 5.5 c80d212c90 feat(fls): DNS records from /dns/hosts, as Java's server answers them
Java's DNS server reads its records from the text file /dns/hosts on every
query. dnsHosts.ts ports that reading (DNSServer.leseRecordListe,
ResourceRecord, Dateisystem.holeDatei) and keeps in the model the records
Java answers: type exactly A, MX or NS, and a name Java accepted. The file
stays in the file system as it is.

Both oracles read 76 hand-picked hosts files (dns-hosts.cases.txt): the
Java oracle through DNSServer.holeResourceRecords (DnsHostsCases), the
Swift oracle through TopologyDNSHostsFileCodec (--dns-hosts). The Java view
matches Java on every case; the model matches Swift except for 33 named
cases in twelve reasons: Java splits at single spaces and LF only, has no
comments or "IN", turns a TTL that is no int into 3600, keeps duplicates,
and empties names with a leading digit. The Swift dump now carries each
server's records; the corpus comparison covers them on 16 files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:38:01 +00:00
julian.kiedaischandClaude Opus 5.5 c3fe56ab16 feat(fls): import installed programs and their settings
importProject carries a host's installed programs into the model with
the settings Swift keeps (web server port, Gnutella peer limit, DNS
recursion and forwarder, personal firewall) and two it does not (the echo
server's port, the generic client's target), plus Java's "switched on".
The Swift oracle writes programs and settings; they match on the 13 files
Swift reads completely.

Intended differences, named in the test:
- every FILIUS program is kept; Swift drops command prompt, text
  editor, file explorer, image viewer, echo server and generic client;
- a web server's files stay in /webserver, its document root; Swift
  moves them to /www. No program state goes into a host's files.
- multicast_server.fls: maxTeilnehmerZahl refers to a shared Integer
  (a button's icon text gap, 4); Swift falls back to 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:12:15 +00:00
julian.kiedaischandClaude Opus 5.5 8080e7dcb2 fix(fls): Gnutella's peer limit is random in Java, not a default
PeerToPeerAnwendung's constructor rolls its peer limit (3, 4 or 5). The
getter defaults measured it once each run — 4, then 5 — and c48d15d
committed 5 as a default. GetterDefaults now constructs every class 64
times and writes a value that varies as {"random": [...]}; the decoder
answers a reference to it as unresolved, and the topology layer reports
a peer limit the file does not set as null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:12:14 +00:00
julian.kiedaischandClaude Opus 5.5 c48d15def4 feat(fls): installed applications as Java loads them
readSystemSoftware lists a PC's or notebook's installed applications with
the settings the model needs: server applications switched on and their
port, the generic client's target, DNS recursion, web server virtual
hosts, Gnutella's peer limit and the personal firewall (on by default,
unlike a router's). Defaults the file leaves out are measured in Java.
All 23 corpus files match Java.

Two examples install an application of their own (Accumulator,
Broadcast), compiled into projekt/anwendungen; it is left out with a
warning, as this reader cannot run Java classes. It must survive a save.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:05:20 +00:00
julian.kiedaischandClaude Opus 5.5 be3b332655 feat(fls): import host file systems into the model
importProject turns a PC's or notebook's Java file tree into Swift's
virtual file system, as Swift's registerVirtualFileSystem does: images
by type or extension from Base64, text by type, unknown types as binary
data or text, unsafe names and collisions left out with a warning, and
the whole import rejected over the project quota. NSString.pathExtension
is measured in the oracle, which now writes every imported file system.

On the 13 files Swift reads completely every file matches, images
compared by hash. Intended: a host whose file has no file system stays
empty, as in Java, where Swift adds the demo files of a new device.
Pending the applications step, the comparison reads our /webserver as
Swift's /www and leaves out the e-mail and Gnutella state files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:28:55 +00:00
julian.kiedaischandClaude Opus 5.5 a198d10b4a feat(core): virtual file system and Swift string semantics
The core gains Swift's virtual file system (paths, case-insensitive
lookup that keeps the spelling, quotas, atomic changes, the defaults of
a new device) and the string behaviour the ported code relies on without
saying so. Both are measured in the Swift oracle: 11 file system cases
(the three Swift tests among them) step by step, and trimming, lower
case, equality, ordering and Base64 case by case — whitespace and control
characters over all of Unicode.

Found by measuring:
- Swift trims NEL and ZERO WIDTH SPACE, not the BOM; JS trim() does the
  opposite. The .fls import now trims with swiftTrim.
- lowercased() maps scalar by scalar: a word-final sigma stays σ.
- Foundation decodes "====" and "Y===" as empty data.
- Foundation on Linux counts 24,735 plane-14 scalars as control
  characters, a table artefact; the port keeps Unicode Cc+Cf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:23:45 +00:00
julian.kiedaischandClaude Opus 5.5 51a83ea68d feat(fls): file systems of PCs and notebooks as Java loads them
readSystemSoftware reads a host's file system: Java's tree of
DefaultMutableTreeNodes, directories named by their user object, files
as Datei (by setters or the three-argument constructor), rooted at
arbeitsVerzeichnis (up to 1.10) or root. All 23 corpus files match Java,
every file compared by name, type and the SHA-256 of its content.

Routers and home routers have files in Java too, but their constructor
makes them from templates (the start page of the firewall's web
interface); they are not in the file and not claimed here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:14:01 +00:00
julian.kiedaischandClaude Opus 5.5 cf47cf8f9d feat(fls): import DHCP, port forwarding and modem settings
importProject carries the DHCP client switch and server settings (hosts
and home routers), a home router's port forwarding rows and a modem's
pairing into the model; the core gains the types, ported from Swift.
The Swift oracle writes them too, and they match on the 13 files Swift
reads completely. Configuration text is now trimmed throughout, as Swift
trims every value it reads (routes and firewall rules included).

Outside those files Swift switches every DHCP server of the Internet
examples off: their "aktiv" refers to a shared Boolean it cannot follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:09:08 +00:00
julian.kiedaischandClaude Opus 5.5 4dcc7e09fc feat(fls): DHCP, static NAT and modem settings as Java loads them
readSystemSoftware adds the DHCP client switch and server settings of
every IP stack, a home router's static NAT table (port forwarding) and a
modem's mode, port and address. All 23 corpus files match Java.

Static DHCP assignments follow setStaticAssignedAddresses: each entry is
split at Java whitespace (the same 25 characters as Character.isWhitespace,
measured over the BMP), and an entry without MAC and IP ends the list, as
Java throws there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:06:08 +00:00
julian.kiedaischandClaude Opus 5.5 ef3bb94cb9 feat(fls): import switch, wireless, routes, RIP and firewall settings
importProject carries the system software settings into the model the
core runs: switch SSID and learning time (an SSID Java would roll comes
from the node id, as in Swift), a host's wireless network, manual routes,
RIP and the firewall of every router and home router. The Swift oracle
writes these settings too; they match on the 13 files Swift reads
completely.

A router's default gateway — its first interface's, which Java routes to
(Weiterleitungstabelle.holeTabelle) — is imported into the router's
device configuration. Swift's model drops it; in internetwork_komplett
the way back from 141.99.5.10 depends on it. A test pings across three
routers in the core, with and without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 21:00:42 +00:00
julian.kiedaischandClaude Opus 5.5 9a389810f9 feat(fls): system software settings as Java loads them
readSystemSoftware adds to each node what the topology needs from its
system software: a switch's SSID and learning time, a host's wireless
SSID, a router's RIP switch, the manual routes and the firewall of a
router or home router. All 23 corpus files match Java.

- A router's firewall is one object its constructor hangs in two places;
  the corpus writes it under the web server's "konfig" plug-in. The
  places are merged.
- The decoder keeps entries a constructor made in a map, reached by
  get(key) (installed applications), like the elements of a list.
- The Java oracle loads every file twice and writes values that differ
  as null: what FILIUS rolls (MACs, a switch's SSID) without text search.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:56:10 +00:00
julian.kiedaischandClaude Opus 5.5 da2ec1dae2 feat(fls): import a .fls topology into the editor model
importProject builds what the simulation core runs from Java's view of a
file: nodes with kinds and ports, links between port ids, device and
interface IP configurations, documentation items with Swift's derived
ids. The core gains the model types it needs (node, link, graph,
documentation item), ported from filius-ipad.

Checked against the Swift import, which the Swift oracle now writes in
full (corpus.swift.json, "state"), on the 13 files Swift reads
completely. Two differences are intended and named in the test:
- a device the file leaves unnamed has Java's default name
  ("Switch / WLAN"), not Swift's;
- multicast_server.fls: useIPAsName refers to a shared Boolean that
  Swift cannot follow; Java shows the IP address, and so do we.
All 23 files import with as many devices and cables as Java has, and an
imported example pings across its router in the core.

Port counts of switches and routers follow Java's lists instead of
Swift's guess from references.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:47:47 +00:00
julian.kiedaischandClaude Opus 5.5 a02bb62413 feat(fls): topology of a .fls file as Java loads it
readTopology maps the decoded JavaBeans graph to devices, cables and
documentation items the way SzenarioVerwaltung.netzwerkLaden does: the
kind from the Java class (the palette label is not file data), devices
without bounds at 0,0, interface values through Java's setters. All 23
corpus files match Java field by field.

Found on the way:
- listItems mixed a constructor's elements with added ones; a router's
  second interface was lost. Lists now replay add/set in order after the
  elements the constructor made.
- The first 0 of a file may be SwingConstants.CENTER; measured like the
  getter defaults.
- IP.ipCheck (javaIp.ts) measured on 46 cases: empty tokens skipped,
  signs, leading zeros and BMP digits of any script accepted.
- The Java oracle took lower-case MACs in a file for random ones (8
  interfaces); it now compares case-insensitively and reports the host
  name flags.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:33:02 +00:00
julian.kiedaischandClaude Opus 5.5 a02b78b4cb feat(fls): XMLEncoder reader following java.beans.XMLDecoder
A generic interpreter for the .fls configuration: objects, properties,
calls, indexes, static fields and factories, Field.set, and id/idref
anywhere — including getter results, answered from the measured Java
defaults or reported as unresolved. All 23 corpus files: class and
position of every node as Java reads them, also where Swift loses nodes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:17:04 +00:00
julian.kiedaischandClaude Opus 5.5 fc9d865820 test(java-oracle): measure the getter defaults XMLEncoder refers to
XMLEncoder shares equal Integer objects, so a node's x coordinate can be
written as a reference to the result of JSidebarButton.getIconTextGap().
GetterDefaults constructs the classes like XMLDecoder does and records
what the getters return (packages/fls/src/javaDefaults.json).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:13:28 +00:00
julian.kiedaischandClaude Opus 5.5 0c843dc3de fix(fls): archive path folding measured against Swift
41 path pairs replayed in the Swift core decide which spellings name
the same file. Two corrections: full Unicode case folding (ß, ligatures,
final sigma, micro, long s) instead of toLowerCase, and width folding of
the whole Halfwidth and Fullwidth Forms block. Swift treats composed and
decomposed spellings as one dictionary key; here the writer refuses both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:09:19 +00:00
julian.kiedaischandClaude Opus 5.5 750cc72c55 feat(fls): ZIP layer of the .fls codec
Reader and writer ported from filius-ipad with the same path policy,
limits and error codes; DEFLATE via fflate, cut at the declared size
like Apple Compression. 54 tests: the Swift archive rejection tests,
DEFLATE edge cases, and all 23 corpus files cross-checked against
fflate.unzipSync and round-tripped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 20:03:07 +00:00
julian.kiedaischandClaude Opus 5.5 5c16cf18b4 test(core): Swift oracle — the filius-ipad core built on Linux as the reference
tools/swift-oracle builds the unchanged Swift runtime (pinned 3b5ded0)
in Docker and replays JSON scenarios; the TypeScript engine must produce
the same trace events, results and end state. Five scenarios, 884
events, identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:33:14 +00:00
julian.kiedaischandClaude Opus 5.5 696334aa5a feat(core): event queue, Ethernet, switch, ARP, IPv4, ICMP, routing and firewall
First slice of the TypeScript port of the filius-ipad runtime engine,
with 29 tests ported from the Swift suite. Parts not ported yet throw
NotPortedError instead of guessing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:22:57 +00:00