#social 2017-10-27
2017-10-27 UTC
timbl, rowan, dlehn and xmpp-social joined the channel
#
puckipedia rhiaro: hahaha. same issue, after JSON-LD compacting
#
puckipedia I wonder if this was an oversight
#
puckipedia also yeah, really didn't realise lol
#
puckipedia oh. I think I know.
#
puckipedia rhiaro: totalItems is defined as http://www.w3.org/2001/XMLSchema#nonNegativeInteger
#
puckipedia rhiaro: fixed it by defining type lol
#
puckipedia I implemented the JSON-LD API myself, and remembered that the inverse mapping is also sensitive to type
#
puckipedia yay :)
#
puckipedia I need to develop a database migration tool - older objects in my DB still have a plain AS2 @context
#
puckipedia my new context takes the Mastodon context and adds a few Kroeg extensions to it, like fixing up jwks/uploadMedia/likes/liked as those aren't defined in AS2. then it adds kroeg:settingsEndpoint and kroeg:blocks
#
puckipedia but the @context in the DB overrides these extensions so now older objects have _:likes
#
puckipedia egh. just figured out why published etc weren't set
#
puckipedia if you guessed "forgot to declare type" then yes
#
puckipedia slowly building a triple store
rowan joined the channel
rowan, rowan_ and timbl joined the channel
#
erincandescent cwebber: I feel it's actually good for a test suite to often do the minimally correct thing
#
erincandescent You should mix it up if possible :)
#
puckipedia erincandescent: though,
{"type": "Like", "object": "[...]"}
is probably a bit too minimal#
erincandescent Hmm, could do with an actor :p
rowan_ joined the channel
#
puckipedia yeah. my code decided "this is an activity. there's no actor. not allowed."
#
puckipedia and this was basically cause for most of the tests failing. also something with access control, might be on Kroeg's end
#
puckipedia (if an object has an actor, it won't get wrapped in a Create. but I did hard-code a list of definite-activities that just get refused without actor. for extensibility, of course :P)
#
cwebber puckipedia: I assumed the server fills in the actor :)
#
cwebber in c2s
#
cwebber s2s is another matter!
#
cwebber after all you probably throw out the actor if it's wrong anyhow in c2s
#
puckipedia I actually just refuse
#
puckipedia but, this is more to prime client developers to do proper "actor" adding
#
cwebber :)
#
puckipedia so if they decide to add custom Activities they will also pass `actor` and they won't get weird behaviour
#
cwebber puckipedia: fair
#
cwebber I'll add that in a few
#
puckipedia yeah, no hurries, still working on my triple store :)
#
puckipedia actually I think I just finished it
#
cwebber wow!
#
puckipedia I figured out how to store entities with no ID in the store. it's a really ugly hack
#
puckipedia (I namespace all the triples into an TripleEntity object, while also having a separate Subject)
#
puckipedia okay, I overlaid the triple store on top of the normal DB store
#
puckipedia god. GETting the outbox is now up to 5 seconds
#
cwebber oop
#
puckipedia tbh, this is from a 'cold start'
#
cwebber puckipedia: I assume you've added the appropriate indexes?
#
puckipedia not yet lol :D
#
cwebber well that probably affects things ;)
#
puckipedia oh lol. I think it actually stored into the DB. but adding to the collection failed
#
puckipedia woo! triple store has roundtrippyness
#
puckipedia ... almost
#
cwebber puckipedia: cool :)
#
cwebber puckipedia: are you going to use triples or quads?
#
puckipedia ... I really just designed quads, didn't I
#
cwebber I'm a bit too fuzzy right now to tell :)
#
cwebber puckipedia: btw I just added an actor field to every activity in the test suite
#
puckipedia well, I basically have a 'graph' which is the main object and sub-objects inside a single Entity
#
cwebber sounds like quads :)
#
cwebber that's good, you want quads
#
puckipedia okay so I developed quads. great.
#
cwebber puckipedia: how are you extracting the "object shape" from it? are you going to use json-ld framing?
#
puckipedia currently I can't recreate arbitrary document shapes yet
#
cwebber json-ld framing probably already does what you want
#
cwebber take a look and check at least
#
puckipedia tbh I'd vote for signing every object separately
#
cwebber > Submitted object, but no ActivityStreams object at response's Location
#
puckipedia yeah that's the 403 issue
#
cwebber oh
#
cwebber I probably am not retrieving the objects, despite submitting them
#
cwebber under the client's credentiasl
#
cwebber easy fix
#
puckipedia okay, I'm throwing the test suite against my quad-based store
#
cwebber let's see
#
puckipedia welp I got disconnected :P
#
cwebber oh
#
cwebber I was restarting it sorry
#
cwebber since I was switching some of the requests to use the client's credentials
#
cwebber back up now
#
cwebber well that's a lot more Yes than before!
#
puckipedia first 4: yes. froze at the response for "Up for some root beer floats?"
#
cwebber well we're getting closer ;)
#
puckipedia as in, no response after the GET request thing
#
cwebber puckipedia: on your end or mine?
#
puckipedia your end
#
puckipedia retrying tests now
#
puckipedia now it works(TM)
#
cwebber nice :)
#
cwebber oh yeah the "froze" was because I restarted
#
cwebber mid-process
#
cwebber heh!
#
puckipedia "name": "An indecisive note"
#
cwebber hehe
#
puckipedia that one is still missing an actor
#
cwebber oh ok
#
cwebber there are some almost-jokes in the activities
#
puckipedia and the following doesn't return the follow because it hasn't been Accepted (also froze again)
#
cwebber puckipedia: should be fixed
#
cwebber oh well re: the froze... another continuation bug :|
#
cwebber ERROR: Attempt to suspend fiber within continuation barrier <- bane of my existence
#
cwebber that could have been my fault this time for live hacking the code during the middle of it running
#
cwebber puckipedia: could you try one more time?
#
cwebber ERROR: Attempt to suspend fiber within continuation barrier
#
cwebber argh
#
puckipedia lol. it's still running though
#
cwebber I'm lost as to why these continuation bugs are happening with your server but not mine
#
cwebber obviously not your fault since it's a language issue
#
puckipedia I respond with the object contents on 201
#
cwebber I don't think that's related if you're suggesting that's why
#
cwebber I do the same thing
#
puckipedia hm
#
cwebber the "root cause" of the bug is described here https://wingolog.org/archives/2010/02/26/guile-and-delimited-continuations
#
cwebber what it really means
#
cwebber is that the continuation is doing some clever things so I don't have to write callback style code because I hate that
#
puckipedia do you know where it happens
#
puckipedia bbiab, food
#
cwebber which is all good and well but it involves the language doing something where, above a "prompt" layer, it suspends the code so the scheduler can resume it when it's ready
#
cwebber the problem is it doesn't work if you "mix in" some C stack
#
cwebber but afaict I'm doing all scheme, and at least it shouldn't be different
#
cwebber puckipedia: sadly not quite, it doesn't "pinpoint" where the issue is happening... which is why this is the hardest damn thing to debug
#
cwebber I may have an idea on how to find it
#
cwebber maybe, maybe I can actually walk the stack and keep checking for the point at which the error is introduced
#
cwebber this might be possible.
#
cwebber but
#
cwebber OH uh
#
cwebber I wonder if my "fix" for the async https stuff is partly causing the issues here
#
cwebber of course.. I'm doing call-with-new-thread... that's *almost certainly* the cause.
#
cwebber I think I have an idea on how to fix it that's less hacky than my current solution.
#
cwebber Oh! This may be easier than I thought.
#
cwebber saying it here so I don't forget:
#
cwebber have each <case-worker> (test suite runner) run in its own independent thread instead of breaking out one to try to get around the https issue.
#
cwebber that should be good enough.
#
cwebber I need to pack up. I'm at a wedding this weekend. I'll work on closing the remaining AP issues while on the trip though.
#
cwebber fixing the continuation bug may have to wait until monday however... we'll see how much time I get.
#
cwebber puckipedia: thank you again for all your help.
#
cwebber you have really done a great job.
#
cwebber also thanks rhiaro for all the help recently on closing issues!
#
xmpp-social [ajordan] Have fun cwebber! \o/
#
cwebber thank you ajordan :)
#
cwebber I'm restarting the test suite on test.ap.rocks (ie, shutting it down from my laptop and putting it back up on the server proper, for obvious reasons)
#
cwebber test.ap.rocks now running on the server proper again
rowan, rowan_, alanz and timbl joined the channel
alanz_ joined the channel
#
rowan_ cwebber: i'm confused about how to use test.activitypub.rocks. is it just a series of questions, or is it supposed to do more?
#
puckipedia I should be properly caching ID values now
#
puckipedia bleh. need to basically rewrite the entirety of the collection utils. maybe replace it with a list of quads? :P
#
puckipedia also I can garbage collect the contents of entities while keeping metadata intact, this could be cool
#
xmpp-social [ajordan] Why would you need metadata but not data? Except for Tombstones?
#
puckipedia I store all remote entities as well, I could possibly make a mechanism to purge them okay I have no reason to do so
#
xmpp-social [ajordan] Lol
#
xmpp-social [ajordan] Gotcha
timbl joined the channel